summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-09-18 09:07:48 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-09-19 17:11:07 (GMT)
commit3a1e6f5f59a38ecbaf8f1dcc8872324a73687f02 (patch)
treec98b106bec9f45b5e9f71201a89968c0cf164f3a /Source/cmLocalGenerator.cxx
parentdffa3f485ce5a2336a7fd06c94522e53b0cab37e (diff)
downloadCMake-3a1e6f5f59a38ecbaf8f1dcc8872324a73687f02.zip
CMake-3a1e6f5f59a38ecbaf8f1dcc8872324a73687f02.tar.gz
CMake-3a1e6f5f59a38ecbaf8f1dcc8872324a73687f02.tar.bz2
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 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;
}