|
@@ -78,12 +78,16 @@ bool cmSiteNameCommand::Invoke(std::vector<std::string>& args)
|
|
|
std::string nsOutput;
|
|
std::string nsOutput;
|
|
|
cmSystemTools::RunCommand(nsCmd.c_str(),
|
|
cmSystemTools::RunCommand(nsCmd.c_str(),
|
|
|
nsOutput);
|
|
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()))
|
|
if(reg.find(nsOutput.c_str()))
|
|
|
{
|
|
{
|
|
|
siteName = reg.match(1);
|
|
siteName = reg.match(1);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
cmCacheManager::GetInstance()->
|
|
cmCacheManager::GetInstance()->
|
|
|
AddCacheEntry("SITE",
|
|
AddCacheEntry("SITE",
|
|
|
siteName.c_str(),
|
|
siteName.c_str(),
|