diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-09-10 13:31:48 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-09-10 13:31:48 (GMT) |
commit | 13d10ee61642ab384d506fa81a991e51d90c6488 (patch) | |
tree | 3ab63ba839614280a3a9c6b5e37827b46bc24b33 /Source/cmGlobalGenerator.cxx | |
parent | 11de1492d3d96f4527990aee212cd94c944c6f64 (diff) | |
download | CMake-13d10ee61642ab384d506fa81a991e51d90c6488.zip CMake-13d10ee61642ab384d506fa81a991e51d90c6488.tar.gz CMake-13d10ee61642ab384d506fa81a991e51d90c6488.tar.bz2 |
cmState::GetInitializedCacheValue: Return as const std::string*
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index b5212fc..99135c8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -215,15 +215,15 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string& lang, if (!optional && (path.empty() || !cmSystemTools::FileExists(path))) { return; } - const char* cname = + const std::string* cname = this->GetCMakeInstance()->GetState()->GetInitializedCacheValue(langComp); std::string changeVars; if (cname && !optional) { std::string cnameString; - if (!cmSystemTools::FileIsFullPath(cname)) { - cnameString = cmSystemTools::FindProgram(cname); + if (!cmSystemTools::FileIsFullPath(*cname)) { + cnameString = cmSystemTools::FindProgram(*cname); } else { - cnameString = cname; + cnameString = *cname; } std::string pathString = path; // get rid of potentially multiple slashes: @@ -239,7 +239,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string& lang, } changeVars += langComp; changeVars += ";"; - changeVars += cname; + changeVars += *cname; this->GetCMakeInstance()->GetState()->SetGlobalProperty( "__CMAKE_DELETE_CACHE_CHANGE_VARS_", changeVars.c_str()); } @@ -1970,7 +1970,7 @@ void cmGlobalGenerator::AddMakefile(cmMakefile* mf) // update progress // estimate how many lg there will be - const char* numGenC = + const std::string* numGenC = this->CMakeInstance->GetState()->GetInitializedCacheValue( "CMAKE_NUMBER_OF_MAKEFILES"); @@ -1988,7 +1988,7 @@ void cmGlobalGenerator::AddMakefile(cmMakefile* mf) return; } - int numGen = atoi(numGenC); + int numGen = atoi(numGenC->c_str()); float prog = 0.9f * static_cast<float>(this->Makefiles.size()) / static_cast<float>(numGen); if (prog > 0.9f) { |