summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-03-12 02:50:35 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-03-12 02:50:35 (GMT)
commitfc26c1459caa61c79b9076e3ca85905e45bbcbc9 (patch)
treea2182bd4f0250b73b8913b7fb9b4e8f334c9fc1a /Source/cmake.cxx
parentb78997d71ddd68247f021bb258f6ffd1e344057b (diff)
downloadCMake-fc26c1459caa61c79b9076e3ca85905e45bbcbc9.zip
CMake-fc26c1459caa61c79b9076e3ca85905e45bbcbc9.tar.gz
CMake-fc26c1459caa61c79b9076e3ca85905e45bbcbc9.tar.bz2
ENH: add ability to suppress dev warnings to gui code
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx32
1 files changed, 20 insertions, 12 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e4d2ead..c6b4052 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -139,6 +139,7 @@ void cmNeedBackwardsCompatibility(const std::string& variable,
cmake::cmake()
{
+ this->SuppressDevWarnings = false;
this->DebugOutput = false;
this->DebugTryCompile = false;
this->ClearBuildSystem = false;
@@ -376,20 +377,11 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
}
else if(arg.find("-Wno-dev",0) == 0)
{
- this->CacheManager->
- AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE",
- "Suppress Warnings that are meant for"
- " the author of the CMakeLists.txt files.",
- cmCacheManager::INTERNAL);
+ this->SuppressDevWarnings = true;
}
else if(arg.find("-Wdev",0) == 0)
{
- this->CacheManager->
- AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE",
- "Suppress Warnings that are meant for"
- " the author of the CMakeLists.txt files.",
- cmCacheManager::INTERNAL);
-
+ this->SuppressDevWarnings = false;
}
else if(arg.find("-U",0) == 0)
{
@@ -1885,6 +1877,23 @@ int cmake::HandleDeleteCacheVariables(const char* var)
int cmake::Configure()
{
+ 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_");
@@ -2185,7 +2194,6 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
{
this->AddCMakePaths();
}
-
// Add any cache args
if ( !this->SetCacheArgs(args) )
{