ENH: add ability to suppress dev warnings to gui code
This commit is contained in:
parent
b78997d71d
commit
fc26c1459c
|
@ -139,6 +139,7 @@ void cmNeedBackwardsCompatibility(const std::string& variable,
|
||||||
|
|
||||||
cmake::cmake()
|
cmake::cmake()
|
||||||
{
|
{
|
||||||
|
this->SuppressDevWarnings = false;
|
||||||
this->DebugOutput = false;
|
this->DebugOutput = false;
|
||||||
this->DebugTryCompile = false;
|
this->DebugTryCompile = false;
|
||||||
this->ClearBuildSystem = 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)
|
else if(arg.find("-Wno-dev",0) == 0)
|
||||||
{
|
{
|
||||||
this->CacheManager->
|
this->SuppressDevWarnings = true;
|
||||||
AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE",
|
|
||||||
"Suppress Warnings that are meant for"
|
|
||||||
" the author of the CMakeLists.txt files.",
|
|
||||||
cmCacheManager::INTERNAL);
|
|
||||||
}
|
}
|
||||||
else if(arg.find("-Wdev",0) == 0)
|
else if(arg.find("-Wdev",0) == 0)
|
||||||
{
|
{
|
||||||
this->CacheManager->
|
this->SuppressDevWarnings = false;
|
||||||
AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE",
|
|
||||||
"Suppress Warnings that are meant for"
|
|
||||||
" the author of the CMakeLists.txt files.",
|
|
||||||
cmCacheManager::INTERNAL);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(arg.find("-U",0) == 0)
|
else if(arg.find("-U",0) == 0)
|
||||||
{
|
{
|
||||||
|
@ -1885,6 +1877,23 @@ int cmake::HandleDeleteCacheVariables(const char* var)
|
||||||
|
|
||||||
int cmake::Configure()
|
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();
|
int ret = this->ActualConfigure();
|
||||||
const char* delCacheVars =
|
const char* delCacheVars =
|
||||||
this->GetProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
this->GetProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
||||||
|
@ -2185,7 +2194,6 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
||||||
{
|
{
|
||||||
this->AddCMakePaths();
|
this->AddCMakePaths();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add any cache args
|
// Add any cache args
|
||||||
if ( !this->SetCacheArgs(args) )
|
if ( !this->SetCacheArgs(args) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -344,6 +344,10 @@ class cmake
|
||||||
{
|
{
|
||||||
this->CMakeEditCommand = s;
|
this->CMakeEditCommand = s;
|
||||||
}
|
}
|
||||||
|
void SetSuppressDevWarnings(bool v)
|
||||||
|
{
|
||||||
|
this->SuppressDevWarnings = v;
|
||||||
|
}
|
||||||
protected:
|
protected:
|
||||||
int HandleDeleteCacheVariables(const char* var);
|
int HandleDeleteCacheVariables(const char* var);
|
||||||
cmPropertyMap Properties;
|
cmPropertyMap Properties;
|
||||||
|
@ -376,7 +380,7 @@ protected:
|
||||||
std::string HomeOutputDirectory;
|
std::string HomeOutputDirectory;
|
||||||
std::string cmStartDirectory;
|
std::string cmStartDirectory;
|
||||||
std::string StartOutputDirectory;
|
std::string StartOutputDirectory;
|
||||||
|
bool SuppressDevWarnings;
|
||||||
std::set<cmStdString> WrittenFiles;
|
std::set<cmStdString> WrittenFiles;
|
||||||
|
|
||||||
///! return true if the same cmake was used to make the cache.
|
///! return true if the same cmake was used to make the cache.
|
||||||
|
|
Loading…
Reference in New Issue