summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorBruno Manganelli <bruno.manga95@gmail.com>2018-11-22 03:36:50 +0000
committerBrad King <brad.king@kitware.com>2019-01-16 08:16:31 -0500
commitcc2a5261f82c21e15899bba0d9b508fcacda7879 (patch)
tree38d9e0113178cd43c7f42898392452b6a8e8e84a /Source/cmInstallCommand.cxx
parentda566d4de885130e182edc80f13691f5ca24bb61 (diff)
downloadcmake-cc2a5261f82c21e15899bba0d9b508fcacda7879.tar.gz
Factor out enum MessageType into dedicated header
Reduce the number of files relying on `cmake.h`.
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 7c8458a58e..c6f40641ed 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -23,12 +23,12 @@
#include "cmInstallTargetGenerator.h"
#include "cmListFileCache.h"
#include "cmMakefile.h"
+#include "cmMessageType.h"
#include "cmPolicies.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmTargetExport.h"
-#include "cmake.h"
class cmExecutionStatus;
@@ -864,7 +864,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
if (gg->IsExportedTargetsFile(file)) {
const char* modal = nullptr;
std::ostringstream e;
- cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ MessageType messageType = MessageType::AUTHOR_WARNING;
switch (status) {
case cmPolicies::WARN:
@@ -876,7 +876,7 @@ bool cmInstallCommand::HandleFilesMode(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 " << file
@@ -887,7 +887,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
"install() command. Use the install(EXPORT) mechanism "
"instead. See the cmake-packages(7) manual for more.\n";
this->Makefile->IssueMessage(messageType, e.str());
- if (messageType == cmake::FATAL_ERROR) {
+ if (messageType == MessageType::FATAL_ERROR) {
return false;
}
}
@@ -1495,7 +1495,7 @@ bool cmInstallCommand::CheckCMP0006(bool& failure)
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0006)) {
case cmPolicies::WARN:
this->Makefile->IssueMessage(
- cmake::AUTHOR_WARNING,
+ MessageType::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0006));
CM_FALLTHROUGH;
case cmPolicies::OLD:
@@ -1508,7 +1508,7 @@ bool cmInstallCommand::CheckCMP0006(bool& failure)
case cmPolicies::REQUIRED_ALWAYS:
failure = true;
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR,
+ MessageType::FATAL_ERROR,
cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0006));
break;
}