[Cmake-commits] CMake branch, next, updated. v3.4.1-1658-g3b6d20b
Brad King
brad.king at kitware.com
Wed Dec 9 08:57:58 EST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 3b6d20b90ba55652b3bd3f75ceed4bc6a45286c4 (commit)
via 7f4a91effc558b164bba6de78388543411541cf4 (commit)
via c185045515eaa9482bc29a0b325fde4f6490f5e1 (commit)
from 93c69b8edc6c0b1a69cc995c0321cc275acdd3ee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b6d20b90ba55652b3bd3f75ceed4bc6a45286c4
commit 3b6d20b90ba55652b3bd3f75ceed4bc6a45286c4
Merge: 93c69b8 7f4a91e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Dec 9 08:57:57 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Dec 9 08:57:57 2015 -0500
Merge topic 'cmake-W-options' into next
7f4a91ef cmake: Deduplicate warning message control code
c1850455 cmake-gui: Add options to control warning messages
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f4a91effc558b164bba6de78388543411541cf4
commit 7f4a91effc558b164bba6de78388543411541cf4
Author: Michael Scott <michael.scott250 at gmail.com>
AuthorDate: Sun Dec 6 12:58:24 2015 +0000
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Dec 9 08:56:17 2015 -0500
cmake: Deduplicate warning message control code
Remove the duplicate code in cmake::Configure to set the cache variables
for the warning message suppression. Replace it with calls to the
dedicated methods to carry this out.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e57e512..7992495 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1269,17 +1269,11 @@ int cmake::Configure()
diagLevel = this->DiagLevels["deprecated"];
if (diagLevel == DIAG_IGNORE)
{
- this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE",
- "Whether to issue warnings for deprecated "
- "functionality.",
- cmState::INTERNAL);
+ this->SetSuppressDeprecatedWarnings(true);
}
else if (diagLevel == DIAG_WARN)
{
- this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE",
- "Whether to issue warnings for deprecated "
- "functionality.",
- cmState::INTERNAL);
+ this->SetSuppressDeprecatedWarnings(false);
}
}
@@ -1299,32 +1293,20 @@ int cmake::Configure()
diagLevel = this->DiagLevels["dev"];
if (diagLevel == DIAG_IGNORE)
{
- this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE",
- "Suppress Warnings that are meant for"
- " the author of the CMakeLists.txt files.",
- cmState::INTERNAL);
+ this->SetSuppressDevWarnings(true);
if (setDeprecatedVariables)
{
- this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE",
- "Whether to issue warnings for deprecated "
- "functionality.",
- cmState::INTERNAL);
+ this->SetSuppressDeprecatedWarnings(true);
}
}
else if (diagLevel == DIAG_WARN)
{
- this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE",
- "Suppress Warnings that are meant for"
- " the author of the CMakeLists.txt files.",
- cmState::INTERNAL);
+ this->SetSuppressDevWarnings(false);
if (setDeprecatedVariables)
{
- this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE",
- "Whether to issue warnings for deprecated "
- "functionality.",
- cmState::INTERNAL);
+ this->SetSuppressDeprecatedWarnings(false);
}
}
}
@@ -2881,6 +2863,24 @@ void cmake::RunCheckForUnusedVariables()
#endif
}
+bool cmake::GetSuppressDevWarnings(cmMakefile const* mf)
+{
+ /*
+ * The suppression CMake variable may be set in the CMake configuration file
+ * itself, so we have to check what its set to in the makefile if we can.
+ */
+ if (mf)
+ {
+ return mf->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS");
+ }
+ else
+ {
+ const char* cacheEntryValue = this->State->GetCacheEntryValue(
+ "CMAKE_SUPPRESS_DEVELOPER_WARNINGS");
+ return cmSystemTools::IsOn(cacheEntryValue);
+ }
+}
+
void cmake::SetSuppressDevWarnings(bool b)
{
std::string value;
@@ -2902,24 +2902,6 @@ void cmake::SetSuppressDevWarnings(bool b)
cmState::INTERNAL);
}
-bool cmake::GetSuppressDevWarnings(cmMakefile const* mf)
-{
- /*
- * The suppression CMake variable may be set in the CMake configuration file
- * itself, so we have to check what its set to in the makefile if we can.
- */
- if (mf)
- {
- return mf->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS");
- }
- else
- {
- const char* cacheEntryValue = this->State->GetCacheEntryValue(
- "CMAKE_SUPPRESS_DEVELOPER_WARNINGS");
- return cmSystemTools::IsOn(cacheEntryValue);
- }
-}
-
bool cmake::GetSuppressDeprecatedWarnings(cmMakefile const* mf)
{
/*
diff --git a/Source/cmake.h b/Source/cmake.h
index 1d63e66..298d82b 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -309,26 +309,26 @@ class cmake
{ return this->CMakeEditCommand; }
/*
- * Set the state of the suppression of developer (author) warnings.
- */
- void SetSuppressDevWarnings(bool v);
- /*
* Get the state of the suppression of developer (author) warnings.
* Returns false, by default, if developer warnings should be shown, true
* otherwise.
*/
bool GetSuppressDevWarnings(cmMakefile const* mf = NULL);
-
/*
- * Set the state of the suppression of deprecated warnings.
+ * Set the state of the suppression of developer (author) warnings.
*/
- void SetSuppressDeprecatedWarnings(bool v);
+ void SetSuppressDevWarnings(bool v);
+
/*
* Get the state of the suppression of deprecated warnings.
* Returns false, by default, if deprecated warnings should be shown, true
* otherwise.
*/
bool GetSuppressDeprecatedWarnings(cmMakefile const* mf = NULL);
+ /*
+ * Set the state of the suppression of deprecated warnings.
+ */
+ void SetSuppressDeprecatedWarnings(bool v);
/** Display a message to the user. */
void IssueMessage(cmake::MessageType t, std::string const& text,
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c185045515eaa9482bc29a0b325fde4f6490f5e1
commit c185045515eaa9482bc29a0b325fde4f6490f5e1
Author: Michael Scott <michael.scott250 at gmail.com>
AuthorDate: Sun Dec 6 12:33:13 2015 +0000
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Dec 9 08:55:52 2015 -0500
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.
diff --git a/Help/release/dev/cmake-W-options.rst b/Help/release/dev/cmake-W-options.rst
index 57d375f..38e71f9 100644
--- a/Help/release/dev/cmake-W-options.rst
+++ b/Help/release/dev/cmake-W-options.rst
@@ -10,3 +10,6 @@ cmake-W-options
* Warnings about deprecated functionality are now enabled by default.
They may be suppressed with ``-Wno-deprecated`` or by setting the
:variable:`CMAKE_WARN_DEPRECATED` variable to false.
+
+* Warnings about deprecated functionality can now be controlled in the
+ :manual:`cmake-gui(1)` application.
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index cad11f5..9161ad3 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -115,6 +115,8 @@ set(SRCS
QCMakeWidgets.h
RegexExplorer.cxx
RegexExplorer.h
+ WarningMessagesDialog.cxx
+ WarningMessagesDialog.h
)
QT4_WRAP_UI(UI_SRCS
CMakeSetupDialog.ui
@@ -122,6 +124,7 @@ QT4_WRAP_UI(UI_SRCS
CrossCompiler.ui
AddCacheEntry.ui
RegexExplorer.ui
+ WarningMessagesDialog.ui
)
QT4_WRAP_CPP(MOC_SRCS
AddCacheEntry.h
@@ -132,6 +135,7 @@ QT4_WRAP_CPP(MOC_SRCS
QCMakeCacheView.h
QCMakeWidgets.h
RegexExplorer.h
+ WarningMessagesDialog.h
)
QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc)
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 2b12834..2fc4faf 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -34,6 +34,7 @@
#include "AddCacheEntry.h"
#include "FirstConfigure.h"
#include "RegexExplorer.h"
+#include "WarningMessagesDialog.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
@@ -145,9 +146,8 @@ CMakeSetupDialog::CMakeSetupDialog()
this, SLOT(doOutputErrorNext())); // in Eclipse
QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options"));
- this->SuppressDevWarningsAction =
- OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)"));
- this->SuppressDevWarningsAction->setCheckable(true);
+ OptionsMenu->addAction(tr("Warning Messages..."),
+ this, SLOT(doWarningMessagesDialog()));
this->WarnUninitializedAction =
OptionsMenu->addAction(tr("&Warn Uninitialized (--warn-uninitialized)"));
this->WarnUninitializedAction->setCheckable(true);
@@ -278,9 +278,6 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->AddEntry, SIGNAL(clicked(bool)),
this, SLOT(addCacheEntry()));
- QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)),
- this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool)));
-
QObject::connect(this->WarnUninitializedAction, SIGNAL(triggered(bool)),
this->CMakeThread->cmakeInstance(),
SLOT(setWarnUninitializedMode(bool)));
@@ -1369,3 +1366,9 @@ void CMakeSetupDialog::doOutputErrorNext()
this->Output->setTextCursor(textCursor);
}
}
+
+void CMakeSetupDialog::doWarningMessagesDialog()
+{
+ WarningMessagesDialog dialog(this, this->CMakeThread->cmakeInstance());
+ dialog.exec();
+}
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index bfd2bc9..4b53b1c 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -83,6 +83,8 @@ protected slots:
void doOutputFindPrev();
void doOutputErrorNext();
void doRegexExplorerDialog();
+ /// display the modal warning messages dialog window
+ void doWarningMessagesDialog();
protected:
@@ -102,7 +104,6 @@ protected:
QAction* ExitAction;
QAction* ConfigureAction;
QAction* GenerateAction;
- QAction* SuppressDevWarningsAction;
QAction* WarnUninitializedAction;
QAction* WarnUnusedAction;
QAction* InstallForCommandLineAction;
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 1fcb676..71b7940 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -26,7 +26,6 @@
QCMake::QCMake(QObject* p)
: QObject(p)
{
- this->SuppressDevWarnings = false;
this->WarnUninitializedMode = false;
this->WarnUnusedMode = false;
qRegisterMetaType<QCMakeProperty>();
@@ -167,7 +166,6 @@ void QCMake::configure()
this->CMakeInstance->SetGeneratorPlatform("");
this->CMakeInstance->SetGeneratorToolset(this->Toolset.toLocal8Bit().data());
this->CMakeInstance->LoadCache();
- this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings);
this->CMakeInstance->SetWarnUninitialized(this->WarnUninitializedMode);
this->CMakeInstance->SetWarnUnused(this->WarnUnusedMode);
this->CMakeInstance->PreLoadCMakeFiles();
@@ -457,10 +455,24 @@ bool QCMake::getDebugOutput() const
return this->CMakeInstance->GetDebugOutput();
}
+bool QCMake::getSuppressDevWarnings()
+{
+ return this->CMakeInstance->GetSuppressDevWarnings();
+}
void QCMake::setSuppressDevWarnings(bool value)
{
- this->SuppressDevWarnings = value;
+ this->CMakeInstance->SetSuppressDevWarnings(value);
+}
+
+bool QCMake::getSuppressDeprecatedWarnings()
+{
+ return this->CMakeInstance->GetSuppressDeprecatedWarnings();
+}
+
+void QCMake::setSuppressDeprecatedWarnings(bool value)
+{
+ this->CMakeInstance->SetSuppressDeprecatedWarnings(value);
}
void QCMake::setWarnUninitializedMode(bool value)
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index 2d45da9..4b787b9 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -91,8 +91,14 @@ public slots:
void reloadCache();
/// set whether to do debug output
void setDebugOutput(bool);
+ /// get whether to do suppress dev warnings
+ bool getSuppressDevWarnings();
/// set whether to do suppress dev warnings
void setSuppressDevWarnings(bool value);
+ /// get whether to do suppress deprecated warnings
+ bool getSuppressDeprecatedWarnings();
+ /// set whether to do suppress deprecated warnings
+ void setSuppressDeprecatedWarnings(bool value);
/// set whether to run cmake with warnings about uninitialized variables
void setWarnUninitializedMode(bool value);
/// set whether to run cmake with warnings about unused variables
@@ -146,7 +152,6 @@ protected:
bool&, void* cd);
static void stdoutCallback(const char* msg, size_t len, void* cd);
static void stderrCallback(const char* msg, size_t len, void* cd);
- bool SuppressDevWarnings;
bool WarnUninitializedMode;
bool WarnUnusedMode;
bool WarnUnusedAllMode;
diff --git a/Source/QtDialog/WarningMessagesDialog.cxx b/Source/QtDialog/WarningMessagesDialog.cxx
new file mode 100644
index 0000000..e2f4bbc
--- /dev/null
+++ b/Source/QtDialog/WarningMessagesDialog.cxx
@@ -0,0 +1,43 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2015 Kitware, Inc., Gregor Jasny
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+
+#include "WarningMessagesDialog.h"
+
+WarningMessagesDialog::WarningMessagesDialog(QWidget* parent, QCMake* instance)
+ : QDialog(parent), cmakeInstance(instance)
+{
+ this->setupUi(this);
+ this->setInitialValues();
+ this->setupSignals();
+}
+
+void WarningMessagesDialog::setInitialValues()
+{
+ this->suppressDeveloperWarnings->setChecked(
+ this->cmakeInstance->getSuppressDevWarnings());
+ this->suppressDeprecatedWarnings->setChecked(
+ this->cmakeInstance->getSuppressDeprecatedWarnings());
+}
+
+void WarningMessagesDialog::setupSignals()
+{
+ QObject::connect(this->buttonBox, SIGNAL(accepted()),
+ this, SLOT(doAccept()));
+}
+
+void WarningMessagesDialog::doAccept()
+{
+ this->cmakeInstance->setSuppressDevWarnings(
+ this->suppressDeveloperWarnings->isChecked());
+ this->cmakeInstance->setSuppressDeprecatedWarnings(
+ this->suppressDeprecatedWarnings->isChecked());
+}
diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h
new file mode 100644
index 0000000..dee572c
--- /dev/null
+++ b/Source/QtDialog/WarningMessagesDialog.h
@@ -0,0 +1,53 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2015 Kitware, Inc., Gregor Jasny
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+
+#ifndef WarningMessagesDialog_h
+#define WarningMessagesDialog_h
+
+#include <QDialog>
+#include <QWidget>
+
+#include "ui_WarningMessagesDialog.h"
+#include "QCMake.h"
+
+/**
+ * Dialog window for setting the warning message related options.
+ */
+class WarningMessagesDialog : public QDialog, public Ui_MessagesDialog
+{
+ Q_OBJECT
+
+public:
+ WarningMessagesDialog(QWidget* parent, QCMake* instance);
+
+private slots:
+ /**
+ * Handler for the accept event of the ok/cancel button box.
+ */
+ void doAccept();
+
+private:
+ QCMake* cmakeInstance;
+
+ /**
+ * Set the initial values of the widgets on this dialog window, using the
+ * current state of the cache.
+ */
+ void setInitialValues();
+
+ /**
+ * Setup the signals for the widgets on this dialog window.
+ */
+ void setupSignals();
+};
+
+#endif /* MessageDialog_h */
diff --git a/Source/QtDialog/WarningMessagesDialog.ui b/Source/QtDialog/WarningMessagesDialog.ui
new file mode 100644
index 0000000..2367772
--- /dev/null
+++ b/Source/QtDialog/WarningMessagesDialog.ui
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MessagesDialog</class>
+ <widget class="QDialog" name="MessagesDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>250</width>
+ <height>150</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Warning Messages</string>
+ </property>
+ <property name="modal">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Suppress Warnings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QCheckBox" name="suppressDeveloperWarnings">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Developer Warnings</string>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="suppressDeprecatedWarnings">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Deprecated Warnings</string>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>MessagesDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>MessagesDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
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);
+}
diff --git a/Source/cmake.h b/Source/cmake.h
index 4c5515b..1d63e66 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -308,6 +308,9 @@ class cmake
std::string const& GetCMakeEditCommand() const
{ return this->CMakeEditCommand; }
+ /*
+ * Set the state of the suppression of developer (author) warnings.
+ */
void SetSuppressDevWarnings(bool v);
/*
* Get the state of the suppression of developer (author) warnings.
@@ -317,6 +320,10 @@ class cmake
bool GetSuppressDevWarnings(cmMakefile const* mf = NULL);
/*
+ * Set the state of the suppression of deprecated warnings.
+ */
+ void SetSuppressDeprecatedWarnings(bool v);
+ /*
* Get the state of the suppression of deprecated warnings.
* Returns false, by default, if deprecated warnings should be shown, true
* otherwise.
-----------------------------------------------------------------------
Summary of changes:
Help/release/dev/cmake-W-options.rst | 3 +
Source/QtDialog/CMakeLists.txt | 4 +
Source/QtDialog/CMakeSetupDialog.cxx | 15 ++--
Source/QtDialog/CMakeSetupDialog.h | 3 +-
Source/QtDialog/QCMake.cxx | 18 ++++-
Source/QtDialog/QCMake.h | 7 +-
Source/QtDialog/WarningMessagesDialog.cxx | 43 +++++++++++
Source/QtDialog/WarningMessagesDialog.h | 53 +++++++++++++
Source/QtDialog/WarningMessagesDialog.ui | 120 +++++++++++++++++++++++++++++
Source/cmake.cxx | 87 +++++++++++----------
Source/cmake.h | 9 ++-
11 files changed, 311 insertions(+), 51 deletions(-)
create mode 100644 Source/QtDialog/WarningMessagesDialog.cxx
create mode 100644 Source/QtDialog/WarningMessagesDialog.h
create mode 100644 Source/QtDialog/WarningMessagesDialog.ui
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list