VS: Refactor include directory slash conversion

Convert each include directory to windows slashes once instead of
repeating it each time they are written out to the project file.
This commit is contained in:
Brad King 2014-08-13 13:24:48 -04:00
parent 9633d11279
commit 8e026aa7f2
1 changed files with 6 additions and 3 deletions

View File

@ -1584,9 +1584,7 @@ OutputIncludes(std::vector<std::string> const & includes)
for(std::vector<std::string>::const_iterator i = includes.begin();
i != includes.end(); ++i)
{
std::string incDir = *i;
this->ConvertToWindowsSlash(incDir);
*this->BuildFileStream << cmVS10EscapeXML(incDir) << ";";
*this->BuildFileStream << cmVS10EscapeXML(*i) << ";";
}
this->WriteString("%(AdditionalIncludeDirectories)"
"</AdditionalIncludeDirectories>\n", 0);
@ -1978,6 +1976,11 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget,
"C", i->c_str());
for(std::vector<std::string>::iterator ii = includes.begin();
ii != includes.end(); ++ii)
{
this->ConvertToWindowsSlash(*ii);
}
this->WritePlatformConfigTag("ItemDefinitionGroup", i->c_str(), 1);
*this->BuildFileStream << "\n";
// output cl compile flags <ClCompile></ClCompile>