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/cmSiteNameCommand.cxx | |
parent | 99b21e58e020fedc6d09a619c1a8dc2e9ea7e2c5 (diff) | |
download | CMake-11425041f04fd0945480b8f9e9933d1549b93981.zip CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.gz CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.bz2 |
cmMakefile::GetDefinition: return cmProp
Diffstat (limited to 'Source/cmSiteNameCommand.cxx')
-rw-r--r-- | Source/cmSiteNameCommand.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index b2d905e..58af8f0 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -6,6 +6,7 @@ #include "cmExecutionStatus.h" #include "cmMakefile.h" +#include "cmProperty.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" @@ -26,15 +27,15 @@ bool cmSiteNameCommand(std::vector<std::string> const& args, paths.emplace_back("/sbin"); paths.emplace_back("/usr/local/bin"); - const char* cacheValue = status.GetMakefile().GetDefinition(args[0]); + cmProp cacheValue = status.GetMakefile().GetDefinition(args[0]); if (cacheValue) { return true; } - const char* temp = status.GetMakefile().GetDefinition("HOSTNAME"); + cmProp temp = status.GetMakefile().GetDefinition("HOSTNAME"); std::string hostname_cmd; if (temp) { - hostname_cmd = temp; + hostname_cmd = *temp; } else { hostname_cmd = cmSystemTools::FindProgram("hostname", paths); } |