diff options
author | Brad King <brad.king@kitware.com> | 2016-09-27 12:38:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-28 13:40:00 (GMT) |
commit | 40c0482153b54f60cd2f2e573cc1183df56e8a76 (patch) | |
tree | 589121e43e1726364c4d5df1896c0ad3c2bbfd18 /Tests/CMakeLists.txt | |
parent | 8f25f37676cb860348738eff4dfb1c3b8bae0b59 (diff) | |
download | CMake-40c0482153b54f60cd2f2e573cc1183df56e8a76.zip CMake-40c0482153b54f60cd2f2e573cc1183df56e8a76.tar.gz CMake-40c0482153b54f60cd2f2e573cc1183df56e8a76.tar.bz2 |
Tests: Decide earlier whether to test resources
Provide a CMake_TEST_RESOURCES variable storing the decision.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 3681843..c056fb8 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -83,6 +83,17 @@ if(BUILD_TESTING) set(MAKE_SUPPORTS_SPACES 0) endif() + # assume no resources building to test + set(CMake_TEST_RESOURCES FALSE) + # for windows and cygwin assume we have resources + if(WIN32 OR CYGWIN) + set(CMake_TEST_RESOURCES TRUE) + endif() + # for borland and watcom there is no resource support + if(WATCOM OR BORLAND) + set(CMake_TEST_RESOURCES FALSE) + endif() + set(build_generator_args --build-generator ${CMAKE_GENERATOR} ) @@ -262,17 +273,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(CompileFeatures CompileFeatures) ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features) - # assume no resources building to test - set(TEST_RESOURCES FALSE) - # for windows and cygwin assume we have resources - if(WIN32 OR CYGWIN) - set(TEST_RESOURCES TRUE) - endif() - # for borland and watcom there is no resource support - if(WATCOM OR BORLAND) - set(TEST_RESOURCES FALSE) - endif() - if(TEST_RESOURCES) + if(CMake_TEST_RESOURCES) ADD_TEST_MACRO(VSResource VSResource) if (CMAKE_GENERATOR MATCHES "Ninja") add_test_macro(VSResourceNinjaForceRSP VSResourceNinjaForceRSP) |