summaryrefslogtreecommitdiff
path: root/Source/cmSiteNameCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-04-26 09:35:03 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2002-04-26 09:35:03 -0400
commit4879c6cffa27fa4e98f3bf2ae7328bb9f929e83f (patch)
treeae86fff7784813256d6ebb7505b4616ae72a744d /Source/cmSiteNameCommand.cxx
parentd49a5bac60eec84a0e0d739924c9a86ae0c595f2 (diff)
downloadcmake-4879c6cffa27fa4e98f3bf2ae7328bb9f929e83f.tar.gz
ENH: look for nslookup and hostname in the right places
Diffstat (limited to 'Source/cmSiteNameCommand.cxx')
-rw-r--r--Source/cmSiteNameCommand.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index 5a66a9fb8e..d4adc1ae84 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -24,7 +24,14 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("called with incorrect number of arguments");
return false;
}
-
+ std::vector<std::string> paths;
+ paths.push_back("/usr/bsd");
+ paths.push_back("/usr/sbin");
+ paths.push_back("/usr/bin");
+ paths.push_back("/bin");
+ paths.push_back("/sbin");
+ paths.push_back("/usr/local/bin");
+
const char* cacheValue
= m_Makefile->GetDefinition(args[0].c_str());
if(cacheValue)
@@ -40,7 +47,7 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args)
}
else
{
- hostname_cmd = cmSystemTools::FindProgram("hostname");
+ hostname_cmd = cmSystemTools::FindProgram("hostname", paths);
}
std::string siteName = "unknown";
@@ -84,7 +91,7 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args)
}
else
{
- nslookup_cmd = cmSystemTools::FindProgram("nslookup");
+ nslookup_cmd = cmSystemTools::FindProgram("nslookup", paths);
}
// try to find the domain name for this computer