diff options
author | vvs31415 <vvs31415@gitlab.org> | 2020-09-28 09:00:00 -0700 |
---|---|---|
committer | vvs31415 <vvs31415@gitlab.org> | 2020-09-28 09:32:22 -0700 |
commit | d298ae74701364232ea324975019e37db47a095c (patch) | |
tree | 13e03834f686c627c712e9c9a7cfc8aaaddf68b7 /Source/cmGlobalGenerator.cxx | |
parent | 1b03ac7da76c05bfa60e5fcf95aa2bfdf64f27cf (diff) | |
download | cmake-d298ae74701364232ea324975019e37db47a095c.tar.gz |
cmake::GetCacheDefinition: Return cmProp
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 86b01bc821..46030e0001 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -197,12 +197,12 @@ std::string cmGlobalGenerator::SelectMakeProgram( { std::string makeProgram = inMakeProgram; if (cmIsOff(makeProgram)) { - const char* makeProgramCSTR = + cmProp makeProgramCSTR = this->CMakeInstance->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); if (cmIsOff(makeProgramCSTR)) { makeProgram = makeDefault; } else { - makeProgram = makeProgramCSTR; + makeProgram = *makeProgramCSTR; } if (cmIsOff(makeProgram) && !makeProgram.empty()) { makeProgram = "CMAKE_MAKE_PROGRAM-NOTFOUND"; @@ -2153,10 +2153,11 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator* gen, { this->SetConfiguredFilesPath(gen); this->TryCompileOuterMakefile = mf; - const char* make = + cmProp make = gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); - this->GetCMakeInstance()->AddCacheEntry( - "CMAKE_MAKE_PROGRAM", make, "make program", cmStateEnums::FILEPATH); + this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", cmToCStr(make), + "make program", + cmStateEnums::FILEPATH); // copy the enabled languages this->GetCMakeInstance()->GetState()->SetEnabledLanguages( gen->GetCMakeInstance()->GetState()->GetEnabledLanguages()); |