summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4c3e8ec..e2e0d8e 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -856,19 +856,18 @@ std::string cmLocalGenerator::GetIncludeFlags(
std::string const& includeFlag =
this->Makefile->GetSafeDefinition(cmStrCat("CMAKE_INCLUDE_FLAG_", lang));
- const char* sep = cmToCStr(
- this->Makefile->GetDefinition(cmStrCat("CMAKE_INCLUDE_FLAG_SEP_", lang)));
bool quotePaths = false;
if (this->Makefile->GetDefinition("CMAKE_QUOTE_INCLUDE_PATHS")) {
quotePaths = true;
}
+ std::string sep = " ";
bool repeatFlag = true;
// should the include flag be repeated like ie. -IA -IB
- if (!sep) {
- sep = " ";
- } else {
+ if (cmProp incSep = this->Makefile->GetDefinition(
+ cmStrCat("CMAKE_INCLUDE_FLAG_SEP_", lang))) {
// if there is a separator then the flag is not repeated but is only
// given once i.e. -classpath a:b:c
+ sep = incSep;
repeatFlag = false;
}