diff options
author | Victor Romero <romerosanchezv@gmail.com> | 2019-06-06 10:24:28 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2019-06-06 10:24:28 +0300 |
commit | 4cd0de67de9cc64b72abc11489a29959ac4e18ec (patch) | |
tree | a878671eb03136d1977e4f71bd5eb56ca37f4fbb /cord | |
parent | 5037da9f7c9b49ca6dfa64b51bbc67b94f470688 (diff) | |
download | bdwgc-4cd0de67de9cc64b72abc11489a29959ac4e18ec.tar.gz |
Do not build the tests by default (CMake)
Issue #281 (bdwgc).
build_cord and build_tests options are introduced in the CMake script.
* CMakeLists.txt (build_cord): Add option (on by default); add comment.
* CMakeLists.txt (build_tests): Add option (off by default).
* CMakeLists.txt (cord): Specify add_subdirectory only if build_cord.
* CMakeLists.txt (tests): Specify add_subdirectory only if build_tests.
* cord/CMakeLists.txt: Skip cordtest and de tests unless build_tests.
Diffstat (limited to 'cord')
-rw-r--r-- | cord/CMakeLists.txt | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/cord/CMakeLists.txt b/cord/CMakeLists.txt index 1fb27e96..a0a8a7b3 100644 --- a/cord/CMakeLists.txt +++ b/cord/CMakeLists.txt @@ -13,17 +13,19 @@ # TODO add_library(cord ...) -add_executable(cordtest cordbscs.c cordprnt.c cordxtra.c - tests/cordtest.c) -set_target_properties(cordtest PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL) -target_link_libraries(cordtest gc-lib) -add_test(NAME cordtest COMMAND cordtest) +if (build_tests) + add_executable(cordtest cordbscs.c cordprnt.c cordxtra.c + tests/cordtest.c) + set_target_properties(cordtest PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL) + target_link_libraries(cordtest gc-lib) + add_test(NAME cordtest COMMAND cordtest) -if (WIN32) - add_executable(de cordbscs.c cordxtra.c - tests/de.c tests/de_win.c) - set_target_properties(de PROPERTIES WIN32_EXECUTABLE TRUE) - set_target_properties(de PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL) - target_link_libraries(de gc-lib) - target_link_libraries(de gdi32) + if (WIN32) + add_executable(de cordbscs.c cordxtra.c + tests/de.c tests/de_win.c) + set_target_properties(de PROPERTIES WIN32_EXECUTABLE TRUE) + set_target_properties(de PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL) + target_link_libraries(de gc-lib) + target_link_libraries(de gdi32) + endif(WIN32) endif() |