summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeCommand.cxx
diff options
context:
space:
mode:
authorBruno Manganelli <bruno.manga95@gmail.com>2018-11-22 03:36:50 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-16 13:16:31 (GMT)
commitcc2a5261f82c21e15899bba0d9b508fcacda7879 (patch)
tree38d9e0113178cd43c7f42898392452b6a8e8e84a /Source/cmIncludeCommand.cxx
parentda566d4de885130e182edc80f13691f5ca24bb61 (diff)
downloadCMake-cc2a5261f82c21e15899bba0d9b508fcacda7879.zip
CMake-cc2a5261f82c21e15899bba0d9b508fcacda7879.tar.gz
CMake-cc2a5261f82c21e15899bba0d9b508fcacda7879.tar.bz2
Factor out enum MessageType into dedicated header
Reduce the number of files relying on `cmake.h`.
Diffstat (limited to 'Source/cmIncludeCommand.cxx')
-rw-r--r--Source/cmIncludeCommand.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index f862578..594c310 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -6,9 +6,9 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
+#include "cmMessageType.h"
#include "cmPolicies.h"
#include "cmSystemTools.h"
-#include "cmake.h"
class cmExecutionStatus;
@@ -58,7 +58,7 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,
}
if (fname.empty()) {
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
+ this->Makefile->IssueMessage(MessageType::AUTHOR_WARNING,
"include() given empty file name (ignored).");
return true;
}
@@ -80,7 +80,7 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,
if (gg->IsExportedTargetsFile(fname_abs)) {
const char* modal = nullptr;
std::ostringstream e;
- cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ MessageType messageType = MessageType::AUTHOR_WARNING;
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0024)) {
case cmPolicies::WARN:
@@ -92,7 +92,7 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,
case cmPolicies::REQUIRED_ALWAYS:
case cmPolicies::NEW:
modal = "may";
- messageType = cmake::FATAL_ERROR;
+ messageType = MessageType::FATAL_ERROR;
}
if (modal) {
e << "The file\n " << fname_abs
@@ -103,7 +103,7 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,
"include() command. Use ALIAS targets instead to refer to targets "
"by alternative names.\n";
this->Makefile->IssueMessage(messageType, e.str());
- if (messageType == cmake::FATAL_ERROR) {
+ if (messageType == MessageType::FATAL_ERROR) {
return false;
}
}