diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-17 16:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-17 16:09:20 (GMT) |
commit | bd891335432a5797a0415ebf35a6f22adba96684 (patch) | |
tree | 9d142b17e1750641d311d9f7fe2f11a4b7a52913 /Source/cmOptionCommand.cxx | |
parent | bee0100396d4b0dad7204125606e6baf26b79e38 (diff) | |
download | CMake-bd891335432a5797a0415ebf35a6f22adba96684.zip CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.gz CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.bz2 |
cmState::GetCacheEntryValue: return cmProp
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r-- | Source/cmOptionCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 22e59ac..a9adf99 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -52,7 +52,7 @@ bool cmOptionCommand(std::vector<std::string> const& args, // See if a cache variable with this name already exists // If so just make sure the doc state is correct cmState* state = status.GetMakefile().GetState(); - const char* existingValue = state->GetCacheEntryValue(args[0]); + cmProp existingValue = state->GetCacheEntryValue(args[0]); if (existingValue && (state->GetCacheEntryType(args[0]) != cmStateEnums::UNINITIALIZED)) { state->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]); @@ -60,7 +60,7 @@ bool cmOptionCommand(std::vector<std::string> const& args, } // Nothing in the cache so add it - std::string initialValue = existingValue ? existingValue : "Off"; + std::string initialValue = existingValue ? *existingValue : "Off"; if (args.size() == 3) { initialValue = args[2]; } |