summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-03-11 19:17:58 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-03-11 19:17:58 (GMT)
commita547ff61cd42d45eb68cbc7fd62a0d1ec79749d8 (patch)
treebf40ce43d5317162ae02eed7abc3f1c16218a105 /Source/cmMakefile.cxx
parent5d2b90097dda987fafb08f7e97a86cf9fab0225f (diff)
downloadCMake-a547ff61cd42d45eb68cbc7fd62a0d1ec79749d8.zip
CMake-a547ff61cd42d45eb68cbc7fd62a0d1ec79749d8.tar.gz
CMake-a547ff61cd42d45eb68cbc7fd62a0d1ec79749d8.tar.bz2
ENH: add a way to suppress the new policy warnings, still need ccmake and gui's
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f245b71..362dbdc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -296,7 +296,16 @@ void cmMakefile::IssueMessage(cmake::MessageType t, std::string const& text) con
}
else
{
- msg << "CMake Warning:";
+ msg << "CMake Warning";
+ if(t == cmake::AUTHOR_WARNING)
+ {
+ if(this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"))
+ {
+ return;
+ }
+ msg << "(Code)";
+ }
+ msg << ":";
}
// Add the immediate context.
@@ -2462,7 +2471,16 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
// to save time we pass the EnableLanguage info directly
gg->EnableLanguagesFromGenerator
(this->LocalGenerator->GetGlobalGenerator());
-
+ if(this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"))
+ {
+ cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS",
+ "TRUE", "", cmCacheManager::INTERNAL);
+ }
+ else
+ {
+ cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS",
+ "FALSE", "", cmCacheManager::INTERNAL);
+ }
if (cm.Configure() != 0)
{
cmSystemTools::Error(