summaryrefslogtreecommitdiff
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-09-18 11:07:48 +0200
committerMarc Chevrier <marc.chevrier@gmail.com>2021-09-19 19:11:07 +0200
commit3a1e6f5f59a38ecbaf8f1dcc8872324a73687f02 (patch)
treec98b106bec9f45b5e9f71201a89968c0cf164f3a /Source/cmLocalGenerator.cxx
parentdffa3f485ce5a2336a7fd06c94522e53b0cab37e (diff)
downloadcmake-3a1e6f5f59a38ecbaf8f1dcc8872324a73687f02.tar.gz
remove cmToCStr function
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 4c3e8ec8f6..e2e0d8e67b 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;
}