diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-08-01 19:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-09-02 11:27:32 (GMT) |
commit | 11425041f04fd0945480b8f9e9933d1549b93981 (patch) | |
tree | 9cafffd6774513f686440b31795cbb3b5e38b65c /Source/cmGlobalGhsMultiGenerator.cxx | |
parent | 99b21e58e020fedc6d09a619c1a8dc2e9ea7e2c5 (diff) | |
download | CMake-11425041f04fd0945480b8f9e9933d1549b93981.zip CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.gz CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.bz2 |
cmMakefile::GetDefinition: return cmProp
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 7c87131..cbaf0ab 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -100,13 +100,13 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorToolset(std::string const& ts, /* set the build tool to use */ std::string gbuild(tsp + ((tsp.back() == '/') ? "" : "/") + DEFAULT_BUILD_PROGRAM); - const char* prevTool = mf->GetDefinition("CMAKE_MAKE_PROGRAM"); + cmProp prevTool = mf->GetDefinition("CMAKE_MAKE_PROGRAM"); /* check if the toolset changed from last generate */ - if (prevTool != nullptr && (gbuild != prevTool)) { + if (prevTool && (gbuild != *prevTool)) { std::string message = cmStrCat("toolset build tool: ", gbuild, - "\nDoes not match the previously used build tool: ", prevTool, + "\nDoes not match the previously used build tool: ", *prevTool, "\nEither remove the CMakeCache.txt file and CMakeFiles " "directory or choose a different binary directory."); cmSystemTools::Error(message); @@ -187,7 +187,8 @@ void cmGlobalGhsMultiGenerator::EnableLanguage( mf->AddDefinition("GHSMULTI", "1"); // identifier for user CMake files - const char* tgtPlatform = mf->GetDefinition("GHS_TARGET_PLATFORM"); + const char* tgtPlatform = + cmToCStrSafe(mf->GetDefinition("GHS_TARGET_PLATFORM")); if (!tgtPlatform) { cmSystemTools::Message("Green Hills MULTI: GHS_TARGET_PLATFORM not " "specified; defaulting to \"integrity\""); @@ -216,10 +217,10 @@ bool cmGlobalGhsMultiGenerator::FindMakeProgram(cmMakefile* /*mf*/) void cmGlobalGhsMultiGenerator::GetToolset(cmMakefile* mf, std::string& tsd, const std::string& ts) { - const char* ghsRoot = mf->GetDefinition("GHS_TOOLSET_ROOT"); + cmProp ghsRoot = mf->GetDefinition("GHS_TOOLSET_ROOT"); if (cmNonempty(ghsRoot)) { - tsd = ghsRoot; + tsd = *ghsRoot; } else { tsd = DEFAULT_TOOLSET_ROOT; } |