summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorMichael Scott <michael.scott250@gmail.com>2015-12-06 12:33:13 (GMT)
committerBrad King <brad.king@kitware.com>2015-12-10 14:28:31 (GMT)
commit67211011d946684bed73bcd5b976ec90f4c30856 (patch)
treee6300f4a87a753feaccfcce2fca254913ef30ee7 /Source/cmake.cxx
parent128d569af02d95e455b5ee1d8dddec07251b7033 (diff)
downloadCMake-67211011d946684bed73bcd5b976ec90f4c30856.zip
CMake-67211011d946684bed73bcd5b976ec90f4c30856.tar.gz
CMake-67211011d946684bed73bcd5b976ec90f4c30856.tar.bz2
cmake-gui: Add options to control warning messages
Create a new dialog window for the cmake-gui that provides controls for setting the state of suppression of developer and deprecated warning messages. This replaces the previous single checkbox for setting the state of suppression of developer warnings. Added a note for the new functionality to the release notes.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx33
1 files changed, 30 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c0a1196..e57e512 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2883,17 +2883,23 @@ void cmake::RunCheckForUnusedVariables()
void cmake::SetSuppressDevWarnings(bool b)
{
+ std::string value;
+
// equivalent to -Wno-dev
if (b)
{
- this->DiagLevels["dev"] = DIAG_IGNORE;
+ value = "TRUE";
}
// equivalent to -Wdev
else
{
- this->DiagLevels["dev"] = std::max(this->DiagLevels["dev"],
- DIAG_WARN);
+ value = "FALSE";
}
+
+ this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(),
+ "Suppress Warnings that are meant for"
+ " the author of the CMakeLists.txt files.",
+ cmState::INTERNAL);
}
bool cmake::GetSuppressDevWarnings(cmMakefile const* mf)
@@ -2932,3 +2938,24 @@ bool cmake::GetSuppressDeprecatedWarnings(cmMakefile const* mf)
return cacheEntryValue && cmSystemTools::IsOff(cacheEntryValue);
}
}
+
+void cmake::SetSuppressDeprecatedWarnings(bool b)
+{
+ std::string value;
+
+ // equivalent to -Wno-deprecated
+ if (b)
+ {
+ value = "FALSE";
+ }
+ // equivalent to -Wdeprecated
+ else
+ {
+ value = "TRUE";
+ }
+
+ this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(),
+ "Whether to issue warnings for deprecated "
+ "functionality.",
+ cmState::INTERNAL);
+}