summaryrefslogtreecommitdiff
path: root/Source/cmSiteNameCommand.cxx
diff options
context:
space:
mode:
authorDan Blezek <blezek@crd.ge.com>2001-05-04 16:43:54 -0400
committerDan Blezek <blezek@crd.ge.com>2001-05-04 16:43:54 -0400
commitf386664efc5a7960e11f3fbfe6507f2b89aa8752 (patch)
treeadb36ff292047fddba965b70224cbb1cf8b839db /Source/cmSiteNameCommand.cxx
parent089aa3e10628aff58992a62b12fa1f1ce6e643b8 (diff)
downloadcmake-f386664efc5a7960e11f3fbfe6507f2b89aa8752.tar.gz
ENH: Correct sitename
Diffstat (limited to 'Source/cmSiteNameCommand.cxx')
-rw-r--r--Source/cmSiteNameCommand.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index b60e1d87b1..241539a67e 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -78,12 +78,16 @@ bool cmSiteNameCommand::Invoke(std::vector<std::string>& args)
std::string nsOutput;
cmSystemTools::RunCommand(nsCmd.c_str(),
nsOutput);
- cmRegularExpression reg(".*Name:(.*)\n");
+ std::string RegExp = ".*Name:[ \t\n]*";
+ RegExp += host;
+ RegExp += "\\.([^ \t\n\r]*)[ \t\n\r]*Address:";
+ cmRegularExpression reg( RegExp.c_str() );
if(reg.find(nsOutput.c_str()))
{
siteName = reg.match(1);
}
}
+
cmCacheManager::GetInstance()->
AddCacheEntry("SITE",
siteName.c_str(),