diff options
author | Bruno Manganelli <bruno.manga95@gmail.com> | 2018-11-22 03:36:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-16 13:16:31 (GMT) |
commit | cc2a5261f82c21e15899bba0d9b508fcacda7879 (patch) | |
tree | 38d9e0113178cd43c7f42898392452b6a8e8e84a /Source/cmParseArgumentsCommand.cxx | |
parent | da566d4de885130e182edc80f13691f5ca24bb61 (diff) | |
download | CMake-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/cmParseArgumentsCommand.cxx')
-rw-r--r-- | Source/cmParseArgumentsCommand.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 2d61cc3..a2bf841 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -9,8 +9,8 @@ #include "cmAlgorithms.h" #include "cmMakefile.h" +#include "cmMessageType.h" #include "cmSystemTools.h" -#include "cmake.h" class cmExecutionStatus; @@ -46,7 +46,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, if (*argIter == "PARSE_ARGV") { if (args.size() != 6) { this->Makefile->IssueMessage( - cmake::FATAL_ERROR, + MessageType::FATAL_ERROR, "PARSE_ARGV must be called with exactly 6 arguments."); cmSystemTools::SetFatalErrorOccured(); return true; @@ -54,7 +54,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, parseFromArgV = true; argIter++; // move past PARSE_ARGV if (!cmSystemTools::StringToULong(argIter->c_str(), &argvStart)) { - this->Makefile->IssueMessage(cmake::FATAL_ERROR, + this->Makefile->IssueMessage(MessageType::FATAL_ERROR, "PARSE_ARGV index '" + *argIter + "' is not an unsigned integer"); cmSystemTools::SetFatalErrorOccured(); @@ -86,7 +86,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, cmSystemTools::ExpandListArgument(*argIter++, list); for (std::string const& iter : list) { if (!used_keywords.insert(iter).second) { - this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter); + this->GetMakefile()->IssueMessage(MessageType::WARNING, + dup_warning + iter); } options[iter]; // default initialize } @@ -96,7 +97,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, cmSystemTools::ExpandListArgument(*argIter++, list); for (std::string const& iter : list) { if (!used_keywords.insert(iter).second) { - this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter); + this->GetMakefile()->IssueMessage(MessageType::WARNING, + dup_warning + iter); } singleValArgs[iter]; // default initialize } @@ -106,7 +108,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, cmSystemTools::ExpandListArgument(*argIter++, list); for (std::string const& iter : list) { if (!used_keywords.insert(iter).second) { - this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter); + this->GetMakefile()->IssueMessage(MessageType::WARNING, + dup_warning + iter); } multiValArgs[iter]; // default initialize } @@ -131,7 +134,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, std::string argc = this->Makefile->GetSafeDefinition("ARGC"); unsigned long count; if (!cmSystemTools::StringToULong(argc.c_str(), &count)) { - this->Makefile->IssueMessage(cmake::FATAL_ERROR, + this->Makefile->IssueMessage(MessageType::FATAL_ERROR, "PARSE_ARGV called with ARGC='" + argc + "' that is not an unsigned integer"); cmSystemTools::SetFatalErrorOccured(); @@ -142,7 +145,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, argName << "ARGV" << i; const char* arg = this->Makefile->GetDefinition(argName.str()); if (!arg) { - this->Makefile->IssueMessage(cmake::FATAL_ERROR, + this->Makefile->IssueMessage(MessageType::FATAL_ERROR, "PARSE_ARGV called with " + argName.str() + " not set"); cmSystemTools::SetFatalErrorOccured(); |