summaryrefslogtreecommitdiff
path: root/Source/cmSiteNameCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-29 16:10:15 -0500
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-29 16:10:15 -0500
commitc237e0ac68922925e3fea15f8c51f9e6afef1d34 (patch)
treebe77938dd74fd852e2c717b2e9e7e150b5e74752 /Source/cmSiteNameCommand.cxx
parentd97e79c971e9e66c32ef7a6e201518542cc239e8 (diff)
downloadcmake-c237e0ac68922925e3fea15f8c51f9e6afef1d34.tar.gz
ENH: Do not use nslookup. All we really care is hostname. If somebody wants something fancy, just set it yourself. Fixes Bug #407 - nslookup is being deprecated for Red Hat and Fedora distributions
Diffstat (limited to 'Source/cmSiteNameCommand.cxx')
-rw-r--r--Source/cmSiteNameCommand.cxx34
1 files changed, 0 insertions, 34 deletions
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index 5dcc984cc6..3eed478c6d 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -84,40 +84,6 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args)
if(host.length())
{
siteName = host;
-
- temp = m_Makefile->GetDefinition("NSLOOKUP");
- std::string nslookup_cmd;
- if(temp)
- {
- nslookup_cmd = temp;
- }
- else
- {
- nslookup_cmd = cmSystemTools::FindProgram("nslookup", paths);
- }
-
- // try to find the domain name for this computer
- if (!cmSystemTools::IsOff(nslookup_cmd.c_str()))
- {
- nslookup_cmd += " ";
- nslookup_cmd += host;
- std::string nsOutput;
- cmSystemTools::RunSingleCommand(nslookup_cmd.c_str(),
- &nsOutput);
-
- // got the domain name
- if (nsOutput.length())
- {
- std::string RegExp = ".*Name:[ \t\n]*";
- RegExp += host;
- RegExp += "\\.([^ \t\n\r]*)[ \t\n\r]*Address:";
- cmsys::RegularExpression reg( RegExp.c_str() );
- if(reg.find(nsOutput.c_str()))
- {
- siteName += '.' + cmSystemTools::LowerCase(reg.match(1));
- }
- }
- }
}
}
}