diff options
author | Dan Blezek <blezek@crd.ge.com> | 2001-05-04 16:43:54 -0400 |
---|---|---|
committer | Dan Blezek <blezek@crd.ge.com> | 2001-05-04 16:43:54 -0400 |
commit | f386664efc5a7960e11f3fbfe6507f2b89aa8752 (patch) | |
tree | adb36ff292047fddba965b70224cbb1cf8b839db /Source | |
parent | 089aa3e10628aff58992a62b12fa1f1ce6e643b8 (diff) | |
download | cmake-f386664efc5a7960e11f3fbfe6507f2b89aa8752.tar.gz |
ENH: Correct sitename
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSiteNameCommand.cxx | 6 |
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(), |