summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-29 20:45:43 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-29 21:23:27 (GMT)
commitdf6b077625f86e4ec0d534f6cd88f8610c5b8f8a (patch)
treec2aa4271583dcad49c08570f90f8caf2b97c8451 /Tests/CMakeLists.txt
parentf2b84d24cfccf49b6332cf3f2ca164fd71ae023e (diff)
downloadCMake-df6b077625f86e4ec0d534f6cd88f8610c5b8f8a.zip
CMake-df6b077625f86e4ec0d534f6cd88f8610c5b8f8a.tar.gz
CMake-df6b077625f86e4ec0d534f6cd88f8610c5b8f8a.tar.bz2
cmake: Remove broken '--warn-unused-vars' option
This option has been broken since commit b9f9915516 (cmMakefile: Remove VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2). That commit removed the check that an initialized variable has actually been used and caused the option to warn on every variable ever set. This was not caught by the test suite because the test for the feature only checked that warnings appear when needed and not that they do not appear when not needed. The option was never very practical to use. Remove it to avoid the runtime cost of usage tracking and checks for every variable (which we were doing even when the option was not used).
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt30
1 files changed, 0 insertions, 30 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 067ffdb..19aa4c4 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2417,36 +2417,6 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleGeneratorTest")
endif()
- add_test(WarnUnusedUnusedViaSet ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaSet"
- "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaSet"
- ${build_generator_args}
- --build-noclean
- --build-project WarnUnusedUnusedViaSet
- --build-options
- "--warn-unused-vars")
- set_tests_properties(WarnUnusedUnusedViaSet PROPERTIES
- PASS_REGULAR_EXPRESSION "unused variable \\(changing definition\\) 'UNUSED_VARIABLE'")
- set_tests_properties(WarnUnusedUnusedViaSet PROPERTIES
- FAIL_REGULAR_EXPRESSION "unused variable \\(unsetting\\) 'UNUSED_VARIABLE'")
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaSet")
-
- add_test(WarnUnusedUnusedViaUnset ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaUnset"
- "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset"
- ${build_generator_args}
- --build-noclean
- --build-project WarnUnusedUnusedViaUnset
- --build-options
- "--warn-unused-vars")
- set_tests_properties(WarnUnusedUnusedViaUnset PROPERTIES
- PASS_REGULAR_EXPRESSION "CMake Warning \\(dev\\) at CMakeLists.txt:7 \\(set\\):")
- set_tests_properties(WarnUnusedUnusedViaUnset PROPERTIES
- FAIL_REGULAR_EXPRESSION "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/WarnUnusedCliUnused"