diff options
author | Michael Scott <michael.scott250@gmail.com> | 2015-12-21 21:39:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-01-12 19:02:51 (GMT) |
commit | 28f2d750edaf6ee1af660d3a0ae6792c65c47997 (patch) | |
tree | 3e22c760e48a58d34c9e337c9ffef0f6295f0ebe /Tests/RunCMake/CommandLine/RunCMakeTest.cmake | |
parent | b5009720d3020021f189570d72c099963795a5c5 (diff) | |
download | CMake-28f2d750edaf6ee1af660d3a0ae6792c65c47997.zip CMake-28f2d750edaf6ee1af660d3a0ae6792c65c47997.tar.gz CMake-28f2d750edaf6ee1af660d3a0ae6792c65c47997.tar.bz2 |
Add -Werror and -Wno-error command-line options
Expand the -W set of cmake options to include support for the -Werror
and -Wno-error format, which is used to control upgrading and
downgrading warning and error messages. Implement support for these new
formats for the dev and deprecated message types.
Add tests and updated documentation for new options.
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 5e2200f..e77ba1f 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -187,6 +187,14 @@ set(RunCMake_TEST_OPTIONS -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Werror=dev) +run_cmake(Werror_dev) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wno-error=dev) +run_cmake(Wno-error_deprecated) +unset(RunCMake_TEST_OPTIONS) + # -Wdev should not override deprecated options if specified set(RunCMake_TEST_OPTIONS -Wdev -Wno-deprecated) run_cmake(Wno-deprecated) @@ -200,6 +208,11 @@ set(RunCMake_TEST_OPTIONS -Wdev) run_cmake(Wdeprecated) unset(RunCMake_TEST_OPTIONS) +# -Werror=dev should enable deprecated errors as well +set(RunCMake_TEST_OPTIONS -Werror=dev) +run_cmake(Werror_deprecated) +unset(RunCMake_TEST_OPTIONS) + set(RunCMake_TEST_OPTIONS -Wdeprecated) run_cmake(Wdeprecated) unset(RunCMake_TEST_OPTIONS) @@ -208,6 +221,14 @@ set(RunCMake_TEST_OPTIONS -Wno-deprecated) run_cmake(Wno-deprecated) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Werror=deprecated) +run_cmake(Werror_deprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wno-error=deprecated) +run_cmake(Wno-error_deprecated) +unset(RunCMake_TEST_OPTIONS) + # Dev warnings should be on by default run_cmake(Wdev) @@ -224,6 +245,7 @@ unset(RunCMake_TEST_OPTIONS) run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -W) run_cmake_command(W_bad-arg2 ${CMAKE_COMMAND} -Wno-) +run_cmake_command(W_bad-arg3 ${CMAKE_COMMAND} -Werror=) set(RunCMake_TEST_OPTIONS --debug-output) run_cmake(debug-output) |