summaryrefslogtreecommitdiff
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-06-12 18:38:33 +0200
committerStephen Kelly <steveire@gmail.com>2016-06-12 18:38:33 +0200
commit0a4af0735f2aeec74a723dd6af31db585f1b664e (patch)
treebf4ab5b590350d3f2203de3b797897ffb37b6596 /Source/cmake.h
parentd6e99fa8345f07a72308b8b33f4a31aa7fe9a0fd (diff)
downloadcmake-0a4af0735f2aeec74a723dd6af31db585f1b664e.tar.gz
cmake: Issue message independent of cmMakefile definition
The makefile is only used when called by the cmMessageCommand, so inline the use of it there. It otherwise creates an undesirable dependency on cmMakefile for issuing messages in the cmake instance, a violation of the Interface Segregation Principle. https://en.wikipedia.org/wiki/Interface_segregation_principle This also makes it more explicit that the variable definitions only affect the message() command. If an AUTHOR_WARNING is issued for any other reason, it is not affected. To affect that, it is necessary to set the cache variable instead of the regular variable. This is an unfortunate interface quirk, but one which can't be fixed easily now.
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 4958a05dc6..aa1ff2caf1 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -339,7 +339,7 @@ public:
* Returns false, by default, if developer warnings should be shown, true
* otherwise.
*/
- bool GetSuppressDevWarnings(cmMakefile const* mf = NULL) const;
+ bool GetSuppressDevWarnings() const;
/*
* Set the state of the suppression of developer (author) warnings.
*/
@@ -350,7 +350,7 @@ public:
* Returns false, by default, if deprecated warnings should be shown, true
* otherwise.
*/
- bool GetSuppressDeprecatedWarnings(cmMakefile const* mf = NULL) const;
+ bool GetSuppressDeprecatedWarnings() const;
/*
* Set the state of the suppression of deprecated warnings.
*/
@@ -361,7 +361,7 @@ public:
* Returns false, by default, if warnings should not be treated as errors,
* true otherwise.
*/
- bool GetDevWarningsAsErrors(cmMakefile const* mf = NULL) const;
+ bool GetDevWarningsAsErrors() const;
/**
* Set the state of treating developer (author) warnings as errors.
*/
@@ -372,7 +372,7 @@ public:
* Returns false, by default, if warnings should not be treated as errors,
* true otherwise.
*/
- bool GetDeprecatedWarningsAsErrors(cmMakefile const* mf = NULL) const;
+ bool GetDeprecatedWarningsAsErrors() const;
/**
* Set the state of treating developer (author) warnings as errors.
*/