summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-22 17:51:40 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-22 17:53:09 (GMT)
commit81739e9215ef10d870f14404b0ec5eb4bee16ce4 (patch)
tree96a5cdb8bc99c5949a4f4570a4cd0e34f41190f0 /Source/cmake.h
parent975426ceb339cf7a17f57ffba2757bb368669f93 (diff)
downloadCMake-81739e9215ef10d870f14404b0ec5eb4bee16ce4.zip
CMake-81739e9215ef10d870f14404b0ec5eb4bee16ce4.tar.gz
CMake-81739e9215ef10d870f14404b0ec5eb4bee16ce4.tar.bz2
Revert topic 'cmake-W-options' (#15747)
The changes in commit c96fe0b4 (cmake: Add -W options to control deprecation warnings and errors, 2015-07-28) fail to account for -Wdev warnings produced by places in CMake other than message(). This causes a regression in which -Wno-dev fails to suppress such warnings. Revert the feature until it can be revised accordingly.
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 31f55ac..20e49e3 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -60,7 +60,6 @@ class cmake
public:
enum MessageType
{ AUTHOR_WARNING,
- AUTHOR_ERROR,
FATAL_ERROR,
INTERNAL_ERROR,
MESSAGE,
@@ -70,12 +69,6 @@ class cmake
DEPRECATION_WARNING
};
- enum WarningLevel
- {
- IGNORE_LEVEL,
- WARNING_LEVEL,
- ERROR_LEVEL
- };
/** \brief Describes the working modes of cmake */
enum WorkingMode
@@ -279,7 +272,6 @@ class cmake
void SetTrace(bool b) { this->Trace = b;}
bool GetTraceExpand() { return this->TraceExpand;}
void SetTraceExpand(bool b) { this->TraceExpand = b;}
- void SetSuppressDevWarnings(bool b);
bool GetWarnUninitialized() { return this->WarnUninitialized;}
void SetWarnUninitialized(bool b) { this->WarnUninitialized = b;}
bool GetWarnUnused() { return this->WarnUnused;}
@@ -300,6 +292,12 @@ class cmake
std::string const& GetCMakeEditCommand() const
{ return this->CMakeEditCommand; }
+ void SetSuppressDevWarnings(bool v)
+ {
+ this->SuppressDevWarnings = v;
+ this->DoSuppressDevWarnings = true;
+ }
+
/** Display a message to the user. */
void IssueMessage(cmake::MessageType t, std::string const& text,
cmListFileBacktrace const& backtrace = cmListFileBacktrace());
@@ -343,7 +341,8 @@ protected:
cmPolicies *Policies;
cmGlobalGenerator *GlobalGenerator;
cmCacheManager *CacheManager;
- std::map<std::string, WarningLevel> WarningLevels;
+ bool SuppressDevWarnings;
+ bool DoSuppressDevWarnings;
std::string GeneratorPlatform;
std::string GeneratorToolset;
@@ -419,15 +418,7 @@ private:
{"-T <toolset-name>", "Specify toolset name if supported by generator."}, \
{"-A <platform-name>", "Specify platform name if supported by generator."}, \
{"-Wno-dev", "Suppress developer warnings."},\
- {"-Wdev", "Enable developer warnings."},\
- {"-Werror=dev", "Make developer warnings errors."},\
- {"-Wno-error=dev", "Make developer warnings not errors."},\
- {"-Wdeprecated", "Enable deprecated macro and function warnings."},\
- {"-Wno-deprecated", "Suppress deprecated macro and function warnings."},\
- {"-Werror=deprecated", "Make deprecated macro and function warnings " \
- "errors."},\
- {"-Wno-error=deprecated", "Make deprecated macro and function warnings " \
- "not errors."}
+ {"-Wdev", "Enable developer warnings."}
#define FOR_EACH_C_FEATURE(F) \
F(c_function_prototypes) \