summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio12Generator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-27 18:33:36 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-07-28 00:00:59 (GMT)
commit7137b1783549fb33fcc09eabdd0d77511d36c23b (patch)
tree2253f23d4869879ae5dbcee47c0ac8025b7a8aaa /Source/cmGlobalVisualStudio12Generator.cxx
parent2409f62d18b714f3342db99201eadc13420708da (diff)
downloadCMake-7137b1783549fb33fcc09eabdd0d77511d36c23b.zip
CMake-7137b1783549fb33fcc09eabdd0d77511d36c23b.tar.gz
CMake-7137b1783549fb33fcc09eabdd0d77511d36c23b.tar.bz2
cmStrCat: use in Windows-specific sources
Diffstat (limited to 'Source/cmGlobalVisualStudio12Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio12Generator.cxx48
1 files changed, 25 insertions, 23 deletions
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index 3c15bd8..6c72c5d 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -65,7 +65,7 @@ public:
cmDocumentationEntry GetDocumentation() const override
{
- return { std::string(vs12generatorName) + " [arch]",
+ return { cmStrCat(vs12generatorName, " [arch]"),
"Deprecated. Generates Visual Studio 2013 project files. "
"Optional [arch] can be \"Win64\" or \"ARM\"." };
}
@@ -80,8 +80,8 @@ public:
std::vector<std::string> GetGeneratorNamesWithPlatform() const override
{
std::vector<std::string> names;
- names.push_back(vs12generatorName + std::string(" ARM"));
- names.push_back(vs12generatorName + std::string(" Win64"));
+ names.push_back(cmStrCat(vs12generatorName, " ARM"));
+ names.push_back(cmStrCat(vs12generatorName, " Win64"));
return names;
}
@@ -151,19 +151,20 @@ bool cmGlobalVisualStudio12Generator::ProcessGeneratorToolsetField(
bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf)
{
if (!this->SelectWindowsPhoneToolset(this->DefaultPlatformToolset)) {
- std::ostringstream e;
+ std::string e;
if (this->DefaultPlatformToolset.empty()) {
- e << this->GetName()
- << " supports Windows Phone '8.0' and '8.1', but "
- "not '"
- << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION.";
+ e = cmStrCat(this->GetName(),
+ " supports Windows Phone '8.0' and '8.1', but "
+ "not '",
+ this->SystemVersion, "'. Check CMAKE_SYSTEM_VERSION.");
} else {
- e << "A Windows Phone component with CMake requires both the Windows "
- "Desktop SDK as well as the Windows Phone '"
- << this->SystemVersion
- << "' SDK. Please make sure that you have both installed";
+ e = cmStrCat(
+ "A Windows Phone component with CMake requires both the Windows "
+ "Desktop SDK as well as the Windows Phone '",
+ this->SystemVersion,
+ "' SDK. Please make sure that you have both installed");
}
- mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e);
return false;
}
return true;
@@ -172,19 +173,20 @@ bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf)
bool cmGlobalVisualStudio12Generator::InitializeWindowsStore(cmMakefile* mf)
{
if (!this->SelectWindowsStoreToolset(this->DefaultPlatformToolset)) {
- std::ostringstream e;
+ std::string e;
if (this->DefaultPlatformToolset.empty()) {
- e << this->GetName()
- << " supports Windows Store '8.0' and '8.1', but "
- "not '"
- << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION.";
+ e = cmStrCat(this->GetName(),
+ " supports Windows Store '8.0' and '8.1', but "
+ "not '",
+ this->SystemVersion, "'. Check CMAKE_SYSTEM_VERSION.");
} else {
- e << "A Windows Store component with CMake requires both the Windows "
- "Desktop SDK as well as the Windows Store '"
- << this->SystemVersion
- << "' SDK. Please make sure that you have both installed";
+ e = cmStrCat(
+ "A Windows Store component with CMake requires both the Windows "
+ "Desktop SDK as well as the Windows Store '",
+ this->SystemVersion,
+ "' SDK. Please make sure that you have both installed");
}
- mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e);
return false;
}
return true;