diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:20:10 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:20:10 +0900 |
commit | f58f7a233a9b66287e1a0fad0d149e3202a098b4 (patch) | |
tree | cc0cea82fae3f153df9299b27650e17c58da1125 /Source/cmSetCommand.cxx | |
parent | 46f8b5215bbbfcf4bc0caed1daf52b678fd2b976 (diff) | |
download | cmake-f58f7a233a9b66287e1a0fad0d149e3202a098b4.tar.gz cmake-f58f7a233a9b66287e1a0fad0d149e3202a098b4.tar.bz2 cmake-f58f7a233a9b66287e1a0fad0d149e3202a098b4.zip |
Imported Upstream version 3.18.0upstream/3.18.0
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r-- | Source/cmSetCommand.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 5e2a1462c..354b4c327 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -5,6 +5,7 @@ #include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmMessageType.h" +#include "cmProperty.h" #include "cmRange.h" #include "cmState.h" #include "cmStateTypes.h" @@ -135,7 +136,7 @@ bool cmSetCommand(std::vector<std::string> const& args, // see if this is already in the cache cmState* state = status.GetMakefile().GetState(); - const char* existingValue = state->GetCacheEntryValue(variable); + cmProp existingValue = state->GetCacheEntryValue(variable); if (existingValue && (state->GetCacheEntryType(variable) != cmStateEnums::UNINITIALIZED)) { // if the set is trying to CACHE the value but the value @@ -149,8 +150,8 @@ bool cmSetCommand(std::vector<std::string> const& args, // if it is meant to be in the cache then define it in the cache if (cache) { - status.GetMakefile().AddCacheDefinition(variable, value.c_str(), docstring, - type, force); + status.GetMakefile().AddCacheDefinition(variable, value, docstring, type, + force); } else { // add the definition status.GetMakefile().AddDefinition(variable, value); |