diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-07-01 11:02:57 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-01 11:03:54 (GMT) |
commit | 8975c2a55b2d274b4de46c482c5873c52ba3a358 (patch) | |
tree | aa5f992ef2787ac8dff7ef56ca96eeb514995e95 /Tests | |
parent | b7af2811aecf9aedf31e3ed98209b6a92c227116 (diff) | |
parent | df6b077625f86e4ec0d534f6cd88f8610c5b8f8a (diff) | |
download | CMake-8975c2a55b2d274b4de46c482c5873c52ba3a358.zip CMake-8975c2a55b2d274b4de46c482c5873c52ba3a358.tar.gz CMake-8975c2a55b2d274b4de46c482c5873c52ba3a358.tar.bz2 |
Merge topic 'remove-warn-unused-vars'
df6b077625 cmake: Remove broken '--warn-unused-vars' option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !4953
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 30 | ||||
-rw-r--r-- | Tests/VariableUnusedViaSet/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/VariableUnusedViaUnset/CMakeLists.txt | 8 |
3 files changed, 0 insertions, 42 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" diff --git a/Tests/VariableUnusedViaSet/CMakeLists.txt b/Tests/VariableUnusedViaSet/CMakeLists.txt deleted file mode 100644 index 0123ab2..0000000 --- a/Tests/VariableUnusedViaSet/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -set(UNUSED_VARIABLE) -# Warning should occur here -set(UNUSED_VARIABLE "Usage") -message(STATUS "${UNUSED_VARIABLE}") diff --git a/Tests/VariableUnusedViaUnset/CMakeLists.txt b/Tests/VariableUnusedViaUnset/CMakeLists.txt deleted file mode 100644 index 4b4031d..0000000 --- a/Tests/VariableUnusedViaUnset/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# NOTE: Changing lines in here changes the test results since the first -# instance shouldn't warn, but the second should and they have the same message - -# A warning should NOT be issued for this line: -set(UNUSED_VARIABLE) -# Warning should occur here: -set(UNUSED_VARIABLE) -message(STATUS "${UNUSED_VARIABLE}") |