diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-16 17:51:51 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-16 17:51:51 (GMT) |
commit | aefc91dd3750430e085417ed7047ca3c64cdab56 (patch) | |
tree | fd21e18d4afd0dbf9683b8b3b077d89e7d7d7897 /Tests/CMakeLists.txt | |
parent | a8e97f8a08f143ebc255c05a50f20b783a0fffa9 (diff) | |
download | CMake-aefc91dd3750430e085417ed7047ca3c64cdab56.zip CMake-aefc91dd3750430e085417ed7047ca3c64cdab56.tar.gz CMake-aefc91dd3750430e085417ed7047ca3c64cdab56.tar.bz2 |
Add test for usage checks via unset
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 995a749..be0c27c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1074,6 +1074,21 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleGeneratorTest") ENDIF(APPLE AND CTEST_TEST_CPACK) + ADD_TEST(WarnUnusedUnusedViaUnset ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaUnset" + "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset" + --build-generator ${CMAKE_TEST_GENERATOR} + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-noclean + --build-project WarnUnusedUnusedViaUnset + --build-options "--warn-unused-vars") + SET_TESTS_PROPERTIES(WarnUnusedUnusedViaUnset PROPERTIES + PASS_REGULAR_EXPRESSION ":7: warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") + SET_TESTS_PROPERTIES(WarnUnusedUnusedViaUnset PROPERTIES + FAIL_REGULAR_EXPRESSION ":5: warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset") + ADD_TEST(WarnUnusedCliUnused ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/VariableUsage" |