mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 07:10:12 -05:00
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
This commit is contained in:
@@ -1742,18 +1742,21 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
|
||||
e2.Element("Link", deployLocation + "\\%(FileName)%(Extension)");
|
||||
}
|
||||
for (size_t i = 0; i != this->Configurations.size(); ++i) {
|
||||
if (0 == strcmp(cge->Evaluate(this->LocalGenerator,
|
||||
this->Configurations[i]),
|
||||
"1")) {
|
||||
e2.WritePlatformConfigTag(
|
||||
"DeploymentContent", "'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" + this->Platform + "'",
|
||||
"true");
|
||||
if (0 ==
|
||||
strcmp(
|
||||
cge->Evaluate(this->LocalGenerator, this->Configurations[i]),
|
||||
"1")) {
|
||||
e2.WritePlatformConfigTag("DeploymentContent",
|
||||
"'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" +
|
||||
this->Platform + "'",
|
||||
"true");
|
||||
} else {
|
||||
e2.WritePlatformConfigTag(
|
||||
"ExcludedFromBuild", "'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" + this->Platform + "'",
|
||||
"true");
|
||||
e2.WritePlatformConfigTag("ExcludedFromBuild",
|
||||
"'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" +
|
||||
this->Platform + "'",
|
||||
"true");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1768,18 +1771,20 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
|
||||
}
|
||||
if (!outputHeaderFile.empty()) {
|
||||
for (size_t i = 0; i != this->Configurations.size(); ++i) {
|
||||
e2.WritePlatformConfigTag(
|
||||
"HeaderFileOutput", "'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" + this->Platform + "'",
|
||||
outputHeaderFile);
|
||||
e2.WritePlatformConfigTag("HeaderFileOutput",
|
||||
"'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" +
|
||||
this->Platform + "'",
|
||||
outputHeaderFile);
|
||||
}
|
||||
}
|
||||
if (!variableName.empty()) {
|
||||
for (size_t i = 0; i != this->Configurations.size(); ++i) {
|
||||
e2.WritePlatformConfigTag(
|
||||
"VariableName", "'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" + this->Platform + "'",
|
||||
variableName);
|
||||
e2.WritePlatformConfigTag("VariableName",
|
||||
"'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" +
|
||||
this->Platform + "'",
|
||||
variableName);
|
||||
}
|
||||
}
|
||||
if (!shaderEnableDebug.empty()) {
|
||||
@@ -1792,8 +1797,9 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
|
||||
cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
|
||||
if (strlen(enableDebug) > 0) {
|
||||
e2.WritePlatformConfigTag(
|
||||
"EnableDebuggingInformation", "'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" + this->Platform + "'",
|
||||
"EnableDebuggingInformation",
|
||||
"'$(Configuration)|$(Platform)'=='" + this->Configurations[i] +
|
||||
"|" + this->Platform + "'",
|
||||
cmSystemTools::IsOn(enableDebug) ? "true" : "false");
|
||||
}
|
||||
}
|
||||
@@ -1808,8 +1814,9 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
|
||||
cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
|
||||
if (strlen(disableOptimizations) > 0) {
|
||||
e2.WritePlatformConfigTag(
|
||||
"DisableOptimizations", "'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[i] + "|" + this->Platform + "'",
|
||||
"DisableOptimizations",
|
||||
"'$(Configuration)|$(Platform)'=='" + this->Configurations[i] +
|
||||
"|" + this->Platform + "'",
|
||||
(cmSystemTools::IsOn(disableOptimizations) ? "true" : "false"));
|
||||
}
|
||||
}
|
||||
@@ -2190,10 +2197,11 @@ void cmVisualStudio10TargetGenerator::WriteExcludeFromBuild(
|
||||
Elem& e2, std::vector<size_t> const& exclude_configs)
|
||||
{
|
||||
for (size_t ci : exclude_configs) {
|
||||
e2.WritePlatformConfigTag(
|
||||
"ExcludedFromBuild", "'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[ci] + "|" + this->Platform + "'",
|
||||
"true");
|
||||
e2.WritePlatformConfigTag("ExcludedFromBuild",
|
||||
"'$(Configuration)|$(Platform)'=='" +
|
||||
this->Configurations[ci] + "|" +
|
||||
this->Platform + "'",
|
||||
"true");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2968,8 +2976,9 @@ bool cmVisualStudio10TargetGenerator::ComputeNasmOptions(
|
||||
std::string configFlagsVar = std::string("CMAKE_ASM_NASM_FLAGS_") + CONFIG;
|
||||
std::string flags =
|
||||
std::string(this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_FLAGS")) +
|
||||
std::string(" -f") + std::string(this->Makefile->GetSafeDefinition(
|
||||
"CMAKE_ASM_NASM_OBJECT_FORMAT")) +
|
||||
std::string(" -f") +
|
||||
std::string(
|
||||
this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_OBJECT_FORMAT")) +
|
||||
std::string(" ") +
|
||||
std::string(this->Makefile->GetSafeDefinition(configFlagsVar));
|
||||
nasmOptions.Parse(flags.c_str());
|
||||
|
||||
Reference in New Issue
Block a user