summaryrefslogtreecommitdiffstats
path: root/Source/cmProjectCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r--Source/cmProjectCommand.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 8f565c8..14e92c6 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -9,10 +9,10 @@
#include "cmAlgorithms.h"
#include "cmMakefile.h"
+#include "cmMessageType.h"
#include "cmPolicies.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
-#include "cmake.h"
class cmExecutionStatus;
@@ -90,7 +90,8 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
if (args[i] == "LANGUAGES") {
if (haveLanguages) {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR, "LANGUAGES may be specified at most once.");
+ MessageType::FATAL_ERROR,
+ "LANGUAGES may be specified at most once.");
cmSystemTools::SetFatalErrorOccured();
return true;
}
@@ -105,11 +106,11 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
"keyword: ";
msg += cmJoin(languages, ", ");
msg += '.';
- this->Makefile->IssueMessage(cmake::WARNING, msg);
+ this->Makefile->IssueMessage(MessageType::WARNING, msg);
}
} else if (args[i] == "VERSION") {
if (haveVersion) {
- this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
"VERSION may be specified at most once.");
cmSystemTools::SetFatalErrorOccured();
return true;
@@ -121,7 +122,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
doing = DoingVersion;
missedValueReporter = [this, &resetReporter]() {
this->Makefile->IssueMessage(
- cmake::WARNING,
+ MessageType::WARNING,
"VERSION keyword not followed by a value or was followed by a "
"value that expanded to nothing.");
resetReporter();
@@ -129,7 +130,8 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
} else if (args[i] == "DESCRIPTION") {
if (haveDescription) {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR, "DESCRIPTION may be specified at most once.");
+ MessageType::FATAL_ERROR,
+ "DESCRIPTION may be specified at most once.");
cmSystemTools::SetFatalErrorOccured();
return true;
}
@@ -140,7 +142,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
doing = DoingDescription;
missedValueReporter = [this, &resetReporter]() {
this->Makefile->IssueMessage(
- cmake::WARNING,
+ MessageType::WARNING,
"DESCRIPTION keyword not followed by a value or was followed "
"by a value that expanded to nothing.");
resetReporter();
@@ -148,7 +150,8 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
} else if (args[i] == "HOMEPAGE_URL") {
if (haveHomepage) {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR, "HOMEPAGE_URL may be specified at most once.");
+ MessageType::FATAL_ERROR,
+ "HOMEPAGE_URL may be specified at most once.");
cmSystemTools::SetFatalErrorOccured();
return true;
}
@@ -156,7 +159,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
doing = DoingHomepage;
missedValueReporter = [this, &resetReporter]() {
this->Makefile->IssueMessage(
- cmake::WARNING,
+ MessageType::WARNING,
"HOMEPAGE_URL keyword not followed by a value or was followed "
"by a value that expanded to nothing.");
resetReporter();
@@ -188,7 +191,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
if ((haveVersion || haveDescription || haveHomepage) && !haveLanguages &&
!languages.empty()) {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR,
+ MessageType::FATAL_ERROR,
"project with VERSION, DESCRIPTION or HOMEPAGE_URL must "
"use LANGUAGES before language names.");
cmSystemTools::SetFatalErrorOccured();
@@ -204,7 +207,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
// Set project VERSION variables to given values
if (cmp0048 == cmPolicies::OLD || cmp0048 == cmPolicies::WARN) {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR,
+ MessageType::FATAL_ERROR,
"VERSION not allowed unless CMP0048 is set to NEW");
cmSystemTools::SetFatalErrorOccured();
return true;
@@ -214,7 +217,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
"^([0-9]+(\\.[0-9]+(\\.[0-9]+(\\.[0-9]+)?)?)?)?$");
if (!vx.find(version)) {
std::string e = "VERSION \"" + version + "\" format invalid.";
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
+ this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e);
cmSystemTools::SetFatalErrorOccured();
return true;
}
@@ -296,7 +299,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
std::ostringstream w;
w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0048)
<< "\nThe following variable(s) would be set to empty:" << vw;
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->Makefile->IssueMessage(MessageType::AUTHOR_WARNING, w.str());
}
}