diff options
Diffstat (limited to 'Tests/RunCMake/CommandLine')
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 38 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/W_bad-arg1-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/W_bad-arg2-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/Wdev-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/Wdev.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/Wno-deprecated.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/Wno-dev.cmake | 2 |
11 files changed, 53 insertions, 3 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 2d94e29..6b4b384 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -129,9 +129,47 @@ set(RunCMake_TEST_OPTIONS -Wno-dev) run_cmake(Wno-dev) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wdev) +run_cmake(Wdev) +unset(RunCMake_TEST_OPTIONS) + +# -Wdev should not override deprecated options if specified +set(RunCMake_TEST_OPTIONS -Wdev -Wno-deprecated) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wno-deprecated -Wdev) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) + +# -Wdev should enable deprecated warnings as well +set(RunCMake_TEST_OPTIONS -Wdev) +run_cmake(Wdeprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wdeprecated) +run_cmake(Wdeprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wno-deprecated) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) + +# Dev warnings should be on by default +run_cmake(Wdev) + +# Deprecated warnings should be on by default +run_cmake(Wdeprecated) + +# Conflicting -W options should honor the last value set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wdev -Wno-dev) +run_cmake(Wno-dev) +unset(RunCMake_TEST_OPTIONS) + +run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -W) +run_cmake_command(W_bad-arg2 ${CMAKE_COMMAND} -Wno-) set(RunCMake_TEST_OPTIONS --debug-output) run_cmake(debug-output) diff --git a/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt new file mode 100644 index 0000000..0c0f613 --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: -W must be followed with \[no-\]<name>. +CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt new file mode 100644 index 0000000..cc643df --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: No warning name provided. +CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt new file mode 100644 index 0000000..e9be1dc --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt @@ -0,0 +1,4 @@ +^CMake Deprecation Warning at Wdeprecated.cmake:1 \(message\): + Some deprecated warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CommandLine/Wdeprecated.cmake b/Tests/RunCMake/CommandLine/Wdeprecated.cmake new file mode 100644 index 0000000..3142b42 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdeprecated.cmake @@ -0,0 +1 @@ +message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt index 92c1d23..88cfb3a 100644 --- a/Tests/RunCMake/CommandLine/Wdev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -1,5 +1,5 @@ ^CMake Warning \(dev\) at Wdev.cmake:1 \(message\): - Some Author Warning + Some author warning Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CommandLine/Wdev.cmake b/Tests/RunCMake/CommandLine/Wdev.cmake index e5026ef..756f31e 100644 --- a/Tests/RunCMake/CommandLine/Wdev.cmake +++ b/Tests/RunCMake/CommandLine/Wdev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # with -Wdev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also diff --git a/Tests/RunCMake/CommandLine/Wno-deprecated.cmake b/Tests/RunCMake/CommandLine/Wno-deprecated.cmake new file mode 100644 index 0000000..3142b42 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-deprecated.cmake @@ -0,0 +1 @@ +message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wno-dev.cmake b/Tests/RunCMake/CommandLine/Wno-dev.cmake index d81b858..802b435 100644 --- a/Tests/RunCMake/CommandLine/Wno-dev.cmake +++ b/Tests/RunCMake/CommandLine/Wno-dev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # without -Wno-dev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also |