summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-11 19:46:38 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-11 20:03:02 (GMT)
commit0795d25b78d5b7682aea091d260eaf1bca7afd0a (patch)
tree59f48720b2e6c48168a377ddcbdb872909de5075
parent1ab4d186a7d5a3481d2f0978aaebd6bf0bc7f891 (diff)
downloadCMake-0795d25b78d5b7682aea091d260eaf1bca7afd0a.zip
CMake-0795d25b78d5b7682aea091d260eaf1bca7afd0a.tar.gz
CMake-0795d25b78d5b7682aea091d260eaf1bca7afd0a.tar.bz2
cmVisualStudio10TargetGenerator: Factor out include dir computation
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx19
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h3
2 files changed, 16 insertions, 6 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f997a11..7074624 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2319,6 +2319,18 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
}
}
+std::vector<std::string> cmVisualStudio10TargetGenerator::GetIncludes(
+ std::string const& config, std::string const& lang) const
+{
+ std::vector<std::string> includes;
+ this->LocalGenerator->GetIncludeDirectories(includes, this->GeneratorTarget,
+ lang, config);
+ for (std::string& i : includes) {
+ this->ConvertToWindowsSlash(i);
+ }
+ return includes;
+}
+
bool cmVisualStudio10TargetGenerator::ComputeClOptions()
{
for (std::string const& i : this->Configurations) {
@@ -3478,12 +3490,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
return;
}
for (std::string const& i : this->Configurations) {
- std::vector<std::string> includes;
- this->LocalGenerator->GetIncludeDirectories(includes,
- this->GeneratorTarget, "C", i);
- for (std::string& ii : includes) {
- this->ConvertToWindowsSlash(ii);
- }
+ std::vector<std::string> const includes = this->GetIncludes(i, "C");
this->WritePlatformConfigTag("ItemDefinitionGroup", i, 1);
*this->BuildFileStream << "\n";
// output cl compile flags <ClCompile></ClCompile>
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index fb24f1a..3f56959 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -90,6 +90,9 @@ private:
void WriteTargetSpecificReferences();
void WriteTargetsFileReferences();
+ std::vector<std::string> GetIncludes(std::string const& config,
+ std::string const& lang) const;
+
bool ComputeClOptions();
bool ComputeClOptions(std::string const& configName);
void WriteClOptions(std::string const& config,