diff options
author | Brad King <brad.king@kitware.com> | 2014-08-13 17:24:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-08-13 18:08:42 (GMT) |
commit | 8e026aa7f27aaa545b6421e61d7ba3add1c5d10d (patch) | |
tree | fac15793666a8e60c519c471a9e97287c4ce0370 /Source | |
parent | 9633d112794e1bb6b08ab6de0c20baca3a8c5847 (diff) | |
download | CMake-8e026aa7f27aaa545b6421e61d7ba3add1c5d10d.zip CMake-8e026aa7f27aaa545b6421e61d7ba3add1c5d10d.tar.gz CMake-8e026aa7f27aaa545b6421e61d7ba3add1c5d10d.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1e9e8e8..5ad63b5 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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> |