summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.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/cmGlobalVisualStudio10Generator.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/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx33
1 files changed, 17 insertions, 16 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 2932970..f6c8012 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -7,6 +7,7 @@
#include "cmGeneratorTarget.h"
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
+#include "cmMessageType.h"
#include "cmSourceFile.h"
#include "cmVersion.h"
#include "cmVisualStudioSlnData.h"
@@ -179,7 +180,7 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
std::ostringstream e;
e << this->GetName() << " Windows CE version '" << this->SystemVersion
<< "' requires CMAKE_GENERATOR_TOOLSET to be set.";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
@@ -252,7 +253,7 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
"contains an invalid version specification."
;
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
// Clear the configured tool-set
this->GeneratorToolsetVersion.clear();
@@ -279,7 +280,7 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
" " << toolsetPath;
;
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
// Clear the configured tool-set
this->GeneratorToolsetVersion.clear();
@@ -333,7 +334,7 @@ bool cmGlobalVisualStudio10Generator::ParseGeneratorToolset(
"that contains a field after the first ',' with no '='."
;
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
std::string const key = fi->substr(0, pos);
@@ -349,7 +350,7 @@ bool cmGlobalVisualStudio10Generator::ParseGeneratorToolset(
"that contains duplicate field key '" << key << "'."
;
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
if (!this->ProcessGeneratorToolsetField(key, value)) {
@@ -363,7 +364,7 @@ bool cmGlobalVisualStudio10Generator::ParseGeneratorToolset(
"that contains invalid field '" << *fi << "'."
;
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
}
@@ -411,12 +412,12 @@ bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf)
std::ostringstream e;
e << "CMAKE_SYSTEM_NAME is 'Android' but CMAKE_GENERATOR "
<< "specifies a platform too: '" << this->GetName() << "'";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
std::string v = this->GetInstalledNsightTegraVersion();
if (v.empty()) {
- mf->IssueMessage(cmake::FATAL_ERROR,
+ mf->IssueMessage(MessageType::FATAL_ERROR,
"CMAKE_SYSTEM_NAME is 'Android' but "
"'NVIDIA Nsight Tegra Visual Studio Edition' "
"is not installed.");
@@ -442,7 +443,7 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsCE(cmMakefile* mf)
std::ostringstream e;
e << "CMAKE_SYSTEM_NAME is 'WindowsCE' but CMAKE_GENERATOR "
<< "specifies a platform too: '" << this->GetName() << "'";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
@@ -455,7 +456,7 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsPhone(cmMakefile* mf)
{
std::ostringstream e;
e << this->GetName() << " does not support Windows Phone.";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
@@ -463,7 +464,7 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsStore(cmMakefile* mf)
{
std::ostringstream e;
e << this->GetName() << " does not support Windows Store.";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
@@ -524,7 +525,7 @@ void cmGlobalVisualStudio10Generator::Generate()
"To avoid this problem CMake must use a full path for this file "
"which then triggers the VS 10 property dialog bug.";
/* clang-format on */
- lg->IssueMessage(cmake::WARNING, e.str().c_str());
+ lg->IssueMessage(MessageType::WARNING, e.str().c_str());
}
}
@@ -707,7 +708,7 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf)
// Prepare the work directory.
if (!cmSystemTools::MakeDirectory(wd)) {
std::string e = "Failed to make directory:\n " + wd;
- mf->IssueMessage(cmake::FATAL_ERROR, e.c_str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.c_str());
cmSystemTools::SetFatalErrorOccured();
return false;
}
@@ -829,7 +830,7 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf)
if (ret != 0) {
e << "Exit code: " << ret << "\n";
}
- mf->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str().c_str());
cmSystemTools::SetFatalErrorOccured();
return false;
}
@@ -973,7 +974,7 @@ bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf)
<< "Install the Microsoft Windows SDK v7.1 to get 64-bit tools:\n"
<< " http://msdn.microsoft.com/en-us/windows/bb980924.aspx";
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str().c_str());
cmSystemTools::SetFatalErrorOccured();
return false;
}
@@ -1154,7 +1155,7 @@ cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable(
e << "JSON flag table \"" << filename <<
"\" could not be loaded.\n";
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str().c_str());
}
return ret;
}