Make it possible to compile openr through CMakeLists.txt

Summary:
This diff fixes `CMakeLists.txt` to enable building `openr` tests using CMake:
1. It adds `add_openr_test` CMake function that adds executable target, registers it as test, links it with bunch of libraries like GTest and GMock, etc...
2. There is no `openr/tests/OpenrModuleTestBase.cpp` anywhere in the source tree, so this commit replaces it with `openr/common/Flags.cpp`.

Reviewed By: jstrizich

Differential Revision: D18584028

fbshipit-source-id: 07d854ef98d0d2509889a08ad042a371101a2825
This commit is contained in:
Anton Frolov 2019-11-25 09:33:44 -08:00 committed by Facebook Github Bot
parent fdc2c659d6
commit 161179c4c6

View File

@ -24,7 +24,8 @@ googletest
re2
[cmake.defines.test=on]
BUILD_TESTS=OFF
BUILD_TESTS=ON
ADD_ROOT_TESTS=OFF
[cmake.defines.test=off]
BUILD_TESTS=OFF