diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-22 14:24:06 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-22 14:24:06 (GMT) |
commit | 6d0845f2f8ac5a3f362428c0a61f3e27d9c7e5e4 (patch) | |
tree | 913a912a8d980a04595c8bbc76de581da9946432 /Source | |
parent | 73b3110eb5c05fc0e866ba727c201afdd458f2b8 (diff) | |
download | CMake-6d0845f2f8ac5a3f362428c0a61f3e27d9c7e5e4.zip CMake-6d0845f2f8ac5a3f362428c0a61f3e27d9c7e5e4.tar.gz CMake-6d0845f2f8ac5a3f362428c0a61f3e27d9c7e5e4.tar.bz2 |
ENH: make sure -Wno-dev sticks so make rebuild_cache will work
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmake.cxx | 37 | ||||
-rw-r--r-- | Source/cmake.h | 1 |
2 files changed, 22 insertions, 16 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index b045f1c..88f1290 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -141,6 +141,7 @@ void cmNeedBackwardsCompatibility(const std::string& variable, cmake::cmake() { this->SuppressDevWarnings = false; + this->DoSuppressDevWarnings = false; this->DebugOutput = false; this->DebugTryCompile = false; this->ClearBuildSystem = false; @@ -387,10 +388,12 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args) else if(arg.find("-Wno-dev",0) == 0) { this->SuppressDevWarnings = true; + this->DoSuppressDevWarnings = true; } else if(arg.find("-Wdev",0) == 0) - { + { this->SuppressDevWarnings = false; + this->DoSuppressDevWarnings = true; } else if(arg.find("-U",0) == 0) { @@ -1896,23 +1899,25 @@ int cmake::HandleDeleteCacheVariables(const char* var) int cmake::Configure() { - if(this->SuppressDevWarnings) + if(this->DoSuppressDevWarnings) { - this->CacheManager-> - AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmCacheManager::INTERNAL); - } - else - { - this->CacheManager-> - AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmCacheManager::INTERNAL); + if(this->SuppressDevWarnings) + { + this->CacheManager-> + AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", + "Suppress Warnings that are meant for" + " the author of the CMakeLists.txt files.", + cmCacheManager::INTERNAL); + } + else + { + this->CacheManager-> + AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", + "Suppress Warnings that are meant for" + " the author of the CMakeLists.txt files.", + cmCacheManager::INTERNAL); + } } - int ret = this->ActualConfigure(); const char* delCacheVars = this->GetProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_"); diff --git a/Source/cmake.h b/Source/cmake.h index f599c31..8134943 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -388,6 +388,7 @@ protected: std::string cmStartDirectory; std::string StartOutputDirectory; bool SuppressDevWarnings; + bool DoSuppressDevWarnings; std::set<cmStdString> WrittenFiles; ///! return true if the same cmake was used to make the cache. |