summaryrefslogtreecommitdiffstats
path: root/Source/cmBuildNameCommand.cxx
diff options
context:
space:
mode:
authorDan Blezek <blezek@crd.ge.com>2001-05-04 20:44:24 (GMT)
committerDan Blezek <blezek@crd.ge.com>2001-05-04 20:44:24 (GMT)
commit1349d06e7851e7d73b8cfbea00d89bfb074a2acb (patch)
treeeaceddb7e3dcfddd093388904e8b0020147718ca /Source/cmBuildNameCommand.cxx
parentf386664efc5a7960e11f3fbfe6507f2b89aa8752 (diff)
downloadCMake-1349d06e7851e7d73b8cfbea00d89bfb074a2acb.zip
CMake-1349d06e7851e7d73b8cfbea00d89bfb074a2acb.tar.gz
CMake-1349d06e7851e7d73b8cfbea00d89bfb074a2acb.tar.bz2
ENH: Proper build name
Diffstat (limited to 'Source/cmBuildNameCommand.cxx')
-rw-r--r--Source/cmBuildNameCommand.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx
index 654ede0..83cabc2 100644
--- a/Source/cmBuildNameCommand.cxx
+++ b/Source/cmBuildNameCommand.cxx
@@ -59,10 +59,24 @@ bool cmBuildNameCommand::Invoke(std::vector<std::string>& args)
if(m_Makefile->GetDefinition("UNIX"))
{
buildname = "";
- cmSystemTools::RunCommand("uname",
+ cmSystemTools::RunCommand("uname -a",
buildname);
+ if(buildname.length())
+ {
+ std::string RegExp = "([^ ]*) [^ ]* ([^ ]*) ";
+ cmRegularExpression reg( RegExp.c_str() );
+ if(reg.find(buildname.c_str()))
+ {
+ buildname = reg.match(1) + "-" + reg.match(2);
+ }
+ }
+
}
-
+
+ std::string compiler = "-${CXX}";
+ m_Makefile->ExpandVariablesInString ( compiler );
+ buildname += compiler;
+
cmCacheManager::GetInstance()->
AddCacheEntry("BUILDNAME",
buildname.c_str(),