summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-03 14:00:42 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-03 14:03:27 (GMT)
commit975426ceb339cf7a17f57ffba2757bb368669f93 (patch)
tree32730e00c4ff553a74f5d7598b07e95877657602 /Source/cmake.cxx
parentc96fe0b40d562b65831376f927b6fd96cf999a52 (diff)
downloadCMake-975426ceb339cf7a17f57ffba2757bb368669f93.zip
CMake-975426ceb339cf7a17f57ffba2757bb368669f93.tar.gz
CMake-975426ceb339cf7a17f57ffba2757bb368669f93.tar.bz2
cmake: Do not treat developer warnings as errors by default in scripts
The logic in commit c96fe0b4 (cmake: Add -W options to control deprecation warnings and errors, 2015-07-28) accidentally enables errors on warnings by default in scripts because there is no initialization of CMAKE_SUPPRESS_DEVELOPER_ERRORS to TRUE. Rename internal CMAKE_SUPPRESS_DEVELOPER_ERRORS cache entry to CMAKE_ERROR_DEVELOPER_WARNINGS. Fix the logic in the message() command to treat AUTHOR_WARNING as an error only if the option is explicitly enabled.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6832141..e28f385 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1289,7 +1289,7 @@ int cmake::Configure()
" the author of the CMakeLists.txt files.",
cmState::INTERNAL);
this->CacheManager->
- AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", "TRUE",
+ AddCacheEntry("CMAKE_ERROR_DEVELOPER_WARNINGS", "FALSE",
"Suppress errors that are meant for"
" the author of the CMakeLists.txt files.",
cmState::INTERNAL);
@@ -1328,7 +1328,7 @@ int cmake::Configure()
else if (warningLevel == ERROR_LEVEL)
{
this->CacheManager->
- AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", "FALSE",
+ AddCacheEntry("CMAKE_ERROR_DEVELOPER_WARNINGS", "TRUE",
"Suppress errors that are meant for"
" the author of the CMakeLists.txt files.",
cmState::INTERNAL);
@@ -1676,11 +1676,11 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
}
// don't turn dev warnings into errors by default, if no value has been
- // specified for the flag, enable it
- if (!this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_ERRORS"))
+ // specified for the flag, disable it
+ if (!this->State->GetCacheEntryValue("CMAKE_ERROR_DEVELOPER_WARNINGS"))
{
this->CacheManager->
- AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", "TRUE",
+ AddCacheEntry("CMAKE_ERROR_DEVELOPER_WARNINGS", "FALSE",
"Suppress errors that are meant for"
" the author of the CMakeLists.txt files.",
cmState::INTERNAL);