summaryrefslogtreecommitdiffstats
path: root/Source/cmSiteNameCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSiteNameCommand.cxx')
-rw-r--r--Source/cmSiteNameCommand.cxx7
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);
}