diff options
Diffstat (limited to 'Source/cmGetCMakePropertyCommand.cxx')
-rw-r--r-- | Source/cmGetCMakePropertyCommand.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index ff4e312..79cbe44 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -7,6 +7,7 @@ #include "cmExecutionStatus.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmProperty.h" #include "cmState.h" #include "cmStringAlgorithms.h" @@ -23,25 +24,25 @@ bool cmGetCMakePropertyCommand(std::vector<std::string> const& args, std::string output = "NOTFOUND"; if (args[1] == "VARIABLES") { - if (const char* varsProp = status.GetMakefile().GetProperty("VARIABLES")) { - output = varsProp; + if (cmProp varsProp = status.GetMakefile().GetProperty("VARIABLES")) { + output = *varsProp; } } else if (args[1] == "MACROS") { output.clear(); - if (const char* macrosProp = status.GetMakefile().GetProperty("MACROS")) { - output = macrosProp; + if (cmProp macrosProp = status.GetMakefile().GetProperty("MACROS")) { + output = *macrosProp; } } else if (args[1] == "COMPONENTS") { const std::set<std::string>* components = status.GetMakefile().GetGlobalGenerator()->GetInstallComponents(); output = cmJoin(*components, ";"); } else { - const char* prop = nullptr; + cmProp prop = nullptr; if (!args[1].empty()) { prop = status.GetMakefile().GetState()->GetGlobalProperty(args[1]); } if (prop) { - output = prop; + output = *prop; } } |