diff options
author | Brad King <brad.king@kitware.com> | 2013-06-05 13:39:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-06-05 13:39:18 (GMT) |
commit | 21b10265419800942ed0806f0e0f5cf6da260bad (patch) | |
tree | e8cf2368939ac222ab4d480b7686bd7bd3a24697 /Tests/CMakeLists.txt | |
parent | 2cd8a6a3c6d505674e113345c58edfb19bf8dc2e (diff) | |
parent | 273ecab96d47d6ddba129be6200bc93ba7910b8c (diff) | |
download | CMake-21b10265419800942ed0806f0e0f5cf6da260bad.zip CMake-21b10265419800942ed0806f0e0f5cf6da260bad.tar.gz CMake-21b10265419800942ed0806f0e0f5cf6da260bad.tar.bz2 |
Merge topic 'suppress-unused-cli-with-value-in-cache'
273ecab CLI: Suppress the unused warning if the key value pair is cached.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9d4f3b8..b742dad 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1640,17 +1640,23 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ FAIL_REGULAR_EXPRESSION "CMake Warning .*VariableUnusedViaUnset.CMakeLists.txt:5 \\(set\\):") list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset") - add_test(WarnUnusedCliUnused ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/VariableUsage" - "${CMake_BINARY_DIR}/Tests/WarnUnusedCliUnused" - ${build_generator_args} - --build-noclean - --build-project WarnUnusedCliUnused - --build-options "-DUNUSED_CLI_VARIABLE=Unused") - set_tests_properties(WarnUnusedCliUnused PROPERTIES - PASS_REGULAR_EXPRESSION "CMake Warning:.*Manually-specified variables were not used by the project:.* UNUSED_CLI_VARIABLE") - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedCliUnused") + if("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile") + # Ninja does not support ADDITIONAL_MAKE_CLEAN_FILES and therefore fails + # this test. (See #13371) + # Apparently Visual Studio does not support it either. As the MakeClean + # test above is only run with the Makefiles generator, only run this + # test with the Makefiles generator also. + add_test(WarnUnusedCliUnused ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/WarnUnusedCliUnused" + "${CMake_BINARY_DIR}/Tests/WarnUnusedCliUnused" + ${build_generator_args} + --build-project WarnUnusedCliUnused + --build-options "-DUNUSED_CLI_VARIABLE=Unused") + set_tests_properties(WarnUnusedCliUnused PROPERTIES + PASS_REGULAR_EXPRESSION "CMake Warning:.*Manually-specified variables were not used by the project:.* UNUSED_CLI_VARIABLE") + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedCliUnused") + endif() add_test(WarnUnusedCliUsed ${CMAKE_CTEST_COMMAND} --build-and-test |