diff options
author | Michael Scott <michael.scott250@gmail.com> | 2015-11-08 12:59:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-12-01 14:35:53 (GMT) |
commit | 246b0bfbfda9a8f3091fc34fc92816aebaf60ae9 (patch) | |
tree | 50d689da4b5cb9993b98466cbebb8577b8bc8376 /Tests | |
parent | deec3a3f06d341cfe0bef4e856b263eff347cc72 (diff) | |
download | CMake-246b0bfbfda9a8f3091fc34fc92816aebaf60ae9.zip CMake-246b0bfbfda9a8f3091fc34fc92816aebaf60ae9.tar.gz CMake-246b0bfbfda9a8f3091fc34fc92816aebaf60ae9.tar.bz2 |
Explicitly enable author (dev) warnings by default.
Explicitly enable author warnings by default, via the
cmake::GetSuppressDevWarnings method, which signals suppression
is turned off unless the CMake variables are set as required.
Add test cases for author and deprecated messages displayed by
default.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/message/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/message/defaultmessage-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/message/defaultmessage-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/message/defaultmessage.cmake | 4 |
5 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 2d94e29..8eaaa08 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -133,6 +133,9 @@ set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) +# Dev warnings should be on by default +run_cmake(Wdev) + set(RunCMake_TEST_OPTIONS --debug-output) run_cmake(debug-output) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake index d2bc0c3..294dfbb 100644 --- a/Tests/RunCMake/message/RunCMakeTest.cmake +++ b/Tests/RunCMake/message/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(defaultmessage) run_cmake(nomessage) run_cmake(warnmessage) run_cmake(errormessage) diff --git a/Tests/RunCMake/message/defaultmessage-result.txt b/Tests/RunCMake/message/defaultmessage-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/message/defaultmessage-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/message/defaultmessage-stderr.txt b/Tests/RunCMake/message/defaultmessage-stderr.txt new file mode 100644 index 0000000..95656ec --- /dev/null +++ b/Tests/RunCMake/message/defaultmessage-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning \(dev\) at defaultmessage.cmake:4 \(message\): + This is a 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/message/defaultmessage.cmake b/Tests/RunCMake/message/defaultmessage.cmake new file mode 100644 index 0000000..427014d --- /dev/null +++ b/Tests/RunCMake/message/defaultmessage.cmake @@ -0,0 +1,4 @@ + +message(DEPRECATION "This is a deprecation warning") + +message(AUTHOR_WARNING "This is a author warning") |