summaryrefslogtreecommitdiffstats
path: root/Source/cmCommand.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-12-25 23:34:44 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-02-13 20:37:08 (GMT)
commit7fb14775a3cce73dc0cb0d759b96059a95f7104b (patch)
tree586ed2e3f7d5a89bb1920bee3c54b94362d797e3 /Source/cmCommand.cxx
parent615e2a17e499b2bd53cce8da1a0cfae36d67b24a (diff)
downloadCMake-7fb14775a3cce73dc0cb0d759b96059a95f7104b.zip
CMake-7fb14775a3cce73dc0cb0d759b96059a95f7104b.tar.gz
CMake-7fb14775a3cce73dc0cb0d759b96059a95f7104b.tar.bz2
cmDisallowedCommand: extract policy checking from cmCommand
Implement cmDisallowedCommand as a wrapper class for cmCommand.
Diffstat (limited to 'Source/cmCommand.cxx')
-rw-r--r--Source/cmCommand.cxx18
1 files changed, 0 insertions, 18 deletions
diff --git a/Source/cmCommand.cxx b/Source/cmCommand.cxx
index 15bed27..d349c91 100644
--- a/Source/cmCommand.cxx
+++ b/Source/cmCommand.cxx
@@ -3,7 +3,6 @@
#include "cmCommand.h"
#include "cmMakefile.h"
-#include "cmake.h"
class cmExecutionStatus;
struct cmListFileArgument;
@@ -32,20 +31,3 @@ void cmCommand::SetError(const std::string& e)
{
this->Error = e;
}
-
-bool cmCommand::Disallowed(cmPolicies::PolicyID pol, const char* e)
-{
- switch (this->Makefile->GetPolicyStatus(pol)) {
- case cmPolicies::WARN:
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
- cmPolicies::GetPolicyWarning(pol));
- case cmPolicies::OLD:
- return false;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::NEW:
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
- break;
- }
- return true;
-}