summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-04 18:12:54 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-04 18:12:54 (GMT)
commitb9aa5041989a415a360e61291142e760ae7eb9e1 (patch)
tree3725c24314f0809afb5479be59458989d6c09a0e /Source/cmLocalGenerator.cxx
parent971653b767f2e5e81085c525c94d5e596474aa88 (diff)
downloadCMake-b9aa5041989a415a360e61291142e760ae7eb9e1.zip
CMake-b9aa5041989a415a360e61291142e760ae7eb9e1.tar.gz
CMake-b9aa5041989a415a360e61291142e760ae7eb9e1.tar.bz2
cmLocalGenerator: Simplify GetIncludeFlags output formatting
Use the output format argument to ConvertToIncludeReference.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 1372c2a..aa64e80 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1295,6 +1295,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
return "";
}
+ OutputFormat shellFormat = forResponseFile? RESPONSE : SHELL;
cmOStringStream includeFlags;
std::string flagVar = "CMAKE_INCLUDE_FLAG_";
@@ -1354,10 +1355,9 @@ std::string cmLocalGenerator::GetIncludeFlags(
frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
if(emitted.insert(frameworkDir).second)
{
- OutputFormat format = forResponseFile? RESPONSE : SHELL;
includeFlags
<< fwSearchFlag << this->Convert(frameworkDir.c_str(),
- START_OUTPUT, format, true)
+ START_OUTPUT, shellFormat, true)
<< " ";
}
continue;
@@ -1376,16 +1376,8 @@ std::string cmLocalGenerator::GetIncludeFlags(
}
flagUsed = true;
}
- std::string includePath;
- if(forResponseFile)
- {
- includePath = this->Convert(i->c_str(), START_OUTPUT,
- RESPONSE, true);
- }
- else
- {
- includePath = this->ConvertToIncludeReference(*i);
- }
+ std::string includePath =
+ this->ConvertToIncludeReference(*i, shellFormat);
if(quotePaths && includePath.size() && includePath[0] != '\"')
{
includeFlags << "\"";