mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-04 23:00:54 +00:00
VS: Fix indentation of .vcxproj files
Patch-by: vvs31415 on gitlab.kitware.com
This commit is contained in:
@@ -2074,15 +2074,15 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->WriteString("<PropertyGroup>\n", 2);
|
this->WriteString("<PropertyGroup>\n", 1);
|
||||||
this->WriteString("<_ProjectFileVersion>10.0.20506.1"
|
this->WriteString("<_ProjectFileVersion>10.0.20506.1"
|
||||||
"</_ProjectFileVersion>\n",
|
"</_ProjectFileVersion>\n",
|
||||||
3);
|
2);
|
||||||
for (std::vector<std::string>::const_iterator config =
|
for (std::vector<std::string>::const_iterator config =
|
||||||
this->Configurations.begin();
|
this->Configurations.begin();
|
||||||
config != this->Configurations.end(); ++config) {
|
config != this->Configurations.end(); ++config) {
|
||||||
if (ttype >= cmStateEnums::UTILITY) {
|
if (ttype >= cmStateEnums::UTILITY) {
|
||||||
this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
|
this->WritePlatformConfigTag("IntDir", config->c_str(), 2);
|
||||||
*this->BuildFileStream
|
*this->BuildFileStream
|
||||||
<< "$(Platform)\\$(Configuration)\\$(ProjectName)\\"
|
<< "$(Platform)\\$(Configuration)\\$(ProjectName)\\"
|
||||||
<< "</IntDir>\n";
|
<< "</IntDir>\n";
|
||||||
@@ -2105,24 +2105,24 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
|
|||||||
this->ConvertToWindowsSlash(intermediateDir);
|
this->ConvertToWindowsSlash(intermediateDir);
|
||||||
this->ConvertToWindowsSlash(outDir);
|
this->ConvertToWindowsSlash(outDir);
|
||||||
|
|
||||||
this->WritePlatformConfigTag("OutDir", config->c_str(), 3);
|
this->WritePlatformConfigTag("OutDir", config->c_str(), 2);
|
||||||
*this->BuildFileStream << cmVS10EscapeXML(outDir) << "</OutDir>\n";
|
*this->BuildFileStream << cmVS10EscapeXML(outDir) << "</OutDir>\n";
|
||||||
|
|
||||||
this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
|
this->WritePlatformConfigTag("IntDir", config->c_str(), 2);
|
||||||
*this->BuildFileStream << cmVS10EscapeXML(intermediateDir)
|
*this->BuildFileStream << cmVS10EscapeXML(intermediateDir)
|
||||||
<< "</IntDir>\n";
|
<< "</IntDir>\n";
|
||||||
|
|
||||||
if (const char* workingDir = this->GeneratorTarget->GetProperty(
|
if (const char* workingDir = this->GeneratorTarget->GetProperty(
|
||||||
"VS_DEBUGGER_WORKING_DIRECTORY")) {
|
"VS_DEBUGGER_WORKING_DIRECTORY")) {
|
||||||
this->WritePlatformConfigTag("LocalDebuggerWorkingDirectory",
|
this->WritePlatformConfigTag("LocalDebuggerWorkingDirectory",
|
||||||
config->c_str(), 3);
|
config->c_str(), 2);
|
||||||
*this->BuildFileStream << cmVS10EscapeXML(workingDir)
|
*this->BuildFileStream << cmVS10EscapeXML(workingDir)
|
||||||
<< "</LocalDebuggerWorkingDirectory>\n";
|
<< "</LocalDebuggerWorkingDirectory>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string name =
|
std::string name =
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
|
cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
|
||||||
this->WritePlatformConfigTag("TargetName", config->c_str(), 3);
|
this->WritePlatformConfigTag("TargetName", config->c_str(), 2);
|
||||||
*this->BuildFileStream << cmVS10EscapeXML(name) << "</TargetName>\n";
|
*this->BuildFileStream << cmVS10EscapeXML(name) << "</TargetName>\n";
|
||||||
|
|
||||||
std::string ext =
|
std::string ext =
|
||||||
@@ -2132,13 +2132,13 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
|
|||||||
// A single "." appears to be treated as an empty extension.
|
// A single "." appears to be treated as an empty extension.
|
||||||
ext = ".";
|
ext = ".";
|
||||||
}
|
}
|
||||||
this->WritePlatformConfigTag("TargetExt", config->c_str(), 3);
|
this->WritePlatformConfigTag("TargetExt", config->c_str(), 2);
|
||||||
*this->BuildFileStream << cmVS10EscapeXML(ext) << "</TargetExt>\n";
|
*this->BuildFileStream << cmVS10EscapeXML(ext) << "</TargetExt>\n";
|
||||||
|
|
||||||
this->OutputLinkIncremental(*config);
|
this->OutputLinkIncremental(*config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->WriteString("</PropertyGroup>\n", 2);
|
this->WriteString("</PropertyGroup>\n", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
|
void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
|
||||||
@@ -2159,13 +2159,13 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
|
|||||||
Options& linkOptions = *(this->LinkOptions[configName]);
|
Options& linkOptions = *(this->LinkOptions[configName]);
|
||||||
|
|
||||||
const char* incremental = linkOptions.GetFlag("LinkIncremental");
|
const char* incremental = linkOptions.GetFlag("LinkIncremental");
|
||||||
this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 3);
|
this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 2);
|
||||||
*this->BuildFileStream << (incremental ? incremental : "true")
|
*this->BuildFileStream << (incremental ? incremental : "true")
|
||||||
<< "</LinkIncremental>\n";
|
<< "</LinkIncremental>\n";
|
||||||
linkOptions.RemoveFlag("LinkIncremental");
|
linkOptions.RemoveFlag("LinkIncremental");
|
||||||
|
|
||||||
const char* manifest = linkOptions.GetFlag("GenerateManifest");
|
const char* manifest = linkOptions.GetFlag("GenerateManifest");
|
||||||
this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 3);
|
this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 2);
|
||||||
*this->BuildFileStream << (manifest ? manifest : "true")
|
*this->BuildFileStream << (manifest ? manifest : "true")
|
||||||
<< "</GenerateManifest>\n";
|
<< "</GenerateManifest>\n";
|
||||||
linkOptions.RemoveFlag("GenerateManifest");
|
linkOptions.RemoveFlag("GenerateManifest");
|
||||||
@@ -2176,7 +2176,7 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
|
|||||||
for (const char** f = flags; *f; ++f) {
|
for (const char** f = flags; *f; ++f) {
|
||||||
const char* flag = *f;
|
const char* flag = *f;
|
||||||
if (const char* value = linkOptions.GetFlag(flag)) {
|
if (const char* value = linkOptions.GetFlag(flag)) {
|
||||||
this->WritePlatformConfigTag(flag, configName.c_str(), 3);
|
this->WritePlatformConfigTag(flag, configName.c_str(), 2);
|
||||||
*this->BuildFileStream << value << "</" << flag << ">\n";
|
*this->BuildFileStream << value << "</" << flag << ">\n";
|
||||||
linkOptions.RemoveFlag(flag);
|
linkOptions.RemoveFlag(flag);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user