mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
strings: combine string literals where possible
This commit is contained in:
@@ -104,8 +104,9 @@ bool cmCPackWIXGenerator::RunCandleCommand(std::string const& sourceFile,
|
||||
|
||||
std::ostringstream command;
|
||||
command << QuotePath(executable);
|
||||
command << " -nologo";
|
||||
command << " -arch " << arch;
|
||||
command << " -nologo"
|
||||
" -arch "
|
||||
<< arch;
|
||||
command << " -out " << QuotePath(objectFile);
|
||||
|
||||
for (std::string const& ext : CandleExtensions) {
|
||||
@@ -132,8 +133,9 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles)
|
||||
|
||||
std::ostringstream command;
|
||||
command << QuotePath(executable);
|
||||
command << " -nologo";
|
||||
command << " -out " << QuotePath(CMakeToWixPath(packageFileNames.at(0)));
|
||||
command << " -nologo"
|
||||
" -out "
|
||||
<< QuotePath(CMakeToWixPath(packageFileNames.at(0)));
|
||||
|
||||
for (std::string const& ext : this->LightExtensions) {
|
||||
command << " -ext " << QuotePath(ext);
|
||||
@@ -1183,7 +1185,8 @@ void cmCPackWIXGenerator::CollectXmlNamespaces(std::string const& variableName,
|
||||
} else {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Invalid element in CPACK_WIX_CUSTOM_XMLNS ignored: "
|
||||
<< "\"" << str << "\"" << std::endl);
|
||||
"\""
|
||||
<< str << "\"" << std::endl);
|
||||
}
|
||||
}
|
||||
std::ostringstream oss;
|
||||
|
||||
@@ -438,7 +438,8 @@ bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf)
|
||||
if (this->PlatformInGeneratorName) {
|
||||
std::ostringstream e;
|
||||
e << "CMAKE_SYSTEM_NAME is 'Android' but CMAKE_GENERATOR "
|
||||
<< "specifies a platform too: '" << this->GetName() << "'";
|
||||
"specifies a platform too: '"
|
||||
<< this->GetName() << "'";
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
return false;
|
||||
}
|
||||
@@ -468,7 +469,8 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsCE(cmMakefile* mf)
|
||||
if (this->PlatformInGeneratorName) {
|
||||
std::ostringstream e;
|
||||
e << "CMAKE_SYSTEM_NAME is 'WindowsCE' but CMAKE_GENERATOR "
|
||||
<< "specifies a platform too: '" << this->GetName() << "'";
|
||||
"specifies a platform too: '"
|
||||
<< this->GetName() << "'";
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,8 @@ bool cmGlobalVisualStudio11Generator::InitializeWindowsPhone(cmMakefile* mf)
|
||||
<< 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
|
||||
"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());
|
||||
@@ -62,7 +63,8 @@ bool cmGlobalVisualStudio11Generator::InitializeWindowsStore(cmMakefile* mf)
|
||||
<< 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
|
||||
"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());
|
||||
|
||||
@@ -159,7 +159,8 @@ bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf)
|
||||
<< 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
|
||||
"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());
|
||||
@@ -179,7 +180,8 @@ bool cmGlobalVisualStudio12Generator::InitializeWindowsStore(cmMakefile* mf)
|
||||
<< 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
|
||||
"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());
|
||||
|
||||
@@ -182,7 +182,8 @@ bool cmGlobalVisualStudio14Generator::InitializeWindowsStore(cmMakefile* mf)
|
||||
<< 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
|
||||
"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());
|
||||
|
||||
@@ -136,9 +136,9 @@ void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
|
||||
<< uname << ".vcproj" << "\", \"{"
|
||||
<< this->GetGUID(uname) << "}\"\n"
|
||||
<< "\tProjectSection(ProjectDependencies) = postProject\n"
|
||||
<< "\t\t{" << guid << "} = {" << guid << "}\n"
|
||||
<< "\tEndProjectSection\n"
|
||||
<< "EndProject\n";
|
||||
"\t\t{" << guid << "} = {" << guid << "}\n"
|
||||
"\tEndProjectSection\n"
|
||||
"EndProject\n";
|
||||
/* clang-format on */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,10 +310,11 @@ std::string cmVisualStudio10TargetGenerator::CalcCondition(
|
||||
// handle special case for 32 bit C# targets
|
||||
if (this->ProjectType == VsProjectType::csproj &&
|
||||
this->Platform == "Win32"_s) {
|
||||
oss << " Or ";
|
||||
oss << "'$(Configuration)|$(Platform)'=='";
|
||||
oss << config << "|x86";
|
||||
oss << "'";
|
||||
oss << " Or "
|
||||
"'$(Configuration)|$(Platform)'=='";
|
||||
oss << config
|
||||
<< "|x86"
|
||||
"'";
|
||||
}
|
||||
return oss.str();
|
||||
}
|
||||
@@ -881,7 +882,7 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
|
||||
oss << " " << i << ";\n";
|
||||
}
|
||||
oss << " "
|
||||
<< "$(BuildDependsOn)\n";
|
||||
"$(BuildDependsOn)\n";
|
||||
e1.Element("BuildDependsOn", oss.str());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user