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/cmStringCommand.cxx | |
parent | 99b21e58e020fedc6d09a619c1a8dc2e9ea7e2c5 (diff) | |
download | CMake-11425041f04fd0945480b8f9e9933d1549b93981.zip CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.gz CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.bz2 |
cmMakefile::GetDefinition: return cmProp
Diffstat (limited to 'Source/cmStringCommand.cxx')
-rw-r--r-- | Source/cmStringCommand.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index a7c21cc..653b383 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -20,6 +20,7 @@ #include "cmGeneratorExpression.h" #include "cmMakefile.h" #include "cmMessageType.h" +#include "cmProperty.h" #include "cmRange.h" #include "cmStringAlgorithms.h" #include "cmStringReplaceHelper.h" @@ -535,11 +536,7 @@ bool HandleAppendCommand(std::vector<std::string> const& args, const std::string& variable = args[1]; - std::string value; - const char* oldValue = status.GetMakefile().GetDefinition(variable); - if (oldValue) { - value = oldValue; - } + std::string value = status.GetMakefile().GetSafeDefinition(variable); value += cmJoin(cmMakeRange(args).advance(2), std::string()); status.GetMakefile().AddDefinition(variable, value); return true; @@ -561,9 +558,9 @@ bool HandlePrependCommand(std::vector<std::string> const& args, const std::string& variable = args[1]; std::string value = cmJoin(cmMakeRange(args).advance(2), std::string()); - const char* oldValue = status.GetMakefile().GetDefinition(variable); + cmProp oldValue = status.GetMakefile().GetDefinition(variable); if (oldValue) { - value += oldValue; + value += *oldValue; } status.GetMakefile().AddDefinition(variable, value); return true; |