summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-09-10 13:31:48 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2018-09-10 13:31:48 (GMT)
commit13d10ee61642ab384d506fa81a991e51d90c6488 (patch)
tree3ab63ba839614280a3a9c6b5e37827b46bc24b33 /Source/cmExtraEclipseCDT4Generator.cxx
parent11de1492d3d96f4527990aee212cd94c944c6f64 (diff)
downloadCMake-13d10ee61642ab384d506fa81a991e51d90c6488.zip
CMake-13d10ee61642ab384d506fa81a991e51d90c6488.tar.gz
CMake-13d10ee61642ab384d506fa81a991e51d90c6488.tar.bz2
cmState::GetInitializedCacheValue: Return as const std::string*
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 313d46b..34f58ad 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -215,7 +215,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
std::string cacheEntryName = "CMAKE_ECLIPSE_ENVVAR_";
cacheEntryName += envVar;
- const char* cacheValue =
+ const std::string* cacheValue =
lg->GetState()->GetInitializedCacheValue(cacheEntryName);
// now we have both, decide which one to use
@@ -232,14 +232,14 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
} else if (!envVarSet && cacheValue != nullptr) {
// It is already in the cache, but not in the env, so use it from the cache
- valueToUse = cacheValue;
+ valueToUse = *cacheValue;
} else {
// It is both in the cache and in the env.
// Use the version from the env. except if the value from the env is
// completely contained in the value from the cache (for the case that we
// now have a PATH without MSVC dirs in the env. but had the full PATH with
// all MSVC dirs during the cmake run which stored the var in the cache:
- valueToUse = cacheValue;
+ valueToUse = *cacheValue;
if (valueToUse.find(envVarValue) == std::string::npos) {
valueToUse = envVarValue;
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),