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/message | |
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/message')
-rw-r--r-- | Tests/RunCMake/message/RunCMakeTest.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage_deprecated-result.txt (renamed from Tests/RunCMake/message/errormessage-result.txt) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage_deprecated-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage_deprecated.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage_dev-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage_dev-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/message/errormessage_dev.cmake | 3 |
9 files changed, 21 insertions, 9 deletions
diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake index 294dfbb..9489693 100644 --- a/Tests/RunCMake/message/RunCMakeTest.cmake +++ b/Tests/RunCMake/message/RunCMakeTest.cmake @@ -3,4 +3,8 @@ include(RunCMake) run_cmake(defaultmessage) run_cmake(nomessage) run_cmake(warnmessage) -run_cmake(errormessage) +# message command sets fatal occurred flag, so check each type of error + +# seperately +run_cmake(errormessage_deprecated) +run_cmake(errormessage_dev) diff --git a/Tests/RunCMake/message/errormessage-stderr.txt b/Tests/RunCMake/message/errormessage-stderr.txt deleted file mode 100644 index 49e7ca9..0000000 --- a/Tests/RunCMake/message/errormessage-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Deprecation Error at errormessage.cmake:4 \(message\): - This is an error -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/message/errormessage.cmake b/Tests/RunCMake/message/errormessage.cmake deleted file mode 100644 index 7d3b779..0000000 --- a/Tests/RunCMake/message/errormessage.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(CMAKE_ERROR_DEPRECATED ON) - -message(DEPRECATION "This is an error") diff --git a/Tests/RunCMake/message/errormessage-result.txt b/Tests/RunCMake/message/errormessage_deprecated-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/message/errormessage-result.txt +++ b/Tests/RunCMake/message/errormessage_deprecated-result.txt diff --git a/Tests/RunCMake/message/errormessage_deprecated-stderr.txt b/Tests/RunCMake/message/errormessage_deprecated-stderr.txt new file mode 100644 index 0000000..dd21c3b --- /dev/null +++ b/Tests/RunCMake/message/errormessage_deprecated-stderr.txt @@ -0,0 +1,4 @@ +^CMake Deprecation Error at errormessage_deprecated.cmake:3 \(message\): + This is a deprecation error +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/message/errormessage_deprecated.cmake b/Tests/RunCMake/message/errormessage_deprecated.cmake new file mode 100644 index 0000000..579275e --- /dev/null +++ b/Tests/RunCMake/message/errormessage_deprecated.cmake @@ -0,0 +1,3 @@ +set(CMAKE_ERROR_DEPRECATED ON) + +message(DEPRECATION "This is a deprecation error") diff --git a/Tests/RunCMake/message/errormessage_dev-result.txt b/Tests/RunCMake/message/errormessage_dev-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/message/errormessage_dev-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/message/errormessage_dev-stderr.txt b/Tests/RunCMake/message/errormessage_dev-stderr.txt new file mode 100644 index 0000000..086b55c --- /dev/null +++ b/Tests/RunCMake/message/errormessage_dev-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error \(dev\) at errormessage_dev.cmake:3 \(message\): + This is a author error +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This error is for project developers. Use -Wno-error=dev to suppress it.$ diff --git a/Tests/RunCMake/message/errormessage_dev.cmake b/Tests/RunCMake/message/errormessage_dev.cmake new file mode 100644 index 0000000..6ba1165 --- /dev/null +++ b/Tests/RunCMake/message/errormessage_dev.cmake @@ -0,0 +1,3 @@ +set(CMAKE_SUPPRESS_DEVELOPER_ERRORS OFF) + +message(AUTHOR_WARNING "This is a author error") |