[Cmake-commits] [cmake-commits] zach.mullen committed SystemInformation.cxx 1.46 1.47
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Oct 6 11:46:21 EDT 2009
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv30340
Modified Files:
SystemInformation.cxx
Log Message:
Added better OS information for Mac OS X
Index: SystemInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemInformation.cxx,v
retrieving revision 1.46
retrieving revision 1.47
diff -C 2 -d -r1.46 -r1.47
*** SystemInformation.cxx 28 Sep 2009 15:37:23 -0000 1.46
--- SystemInformation.cxx 6 Oct 2009 15:46:16 -0000 1.47
***************
*** 243,246 ****
--- 243,247 ----
// For Mac
bool ParseSysCtl();
+ void CallSwVers();
kwsys_stl::string ExtractValueFromSysCtl(const char* word);
kwsys_stl::string SysCtlBuffer;
***************
*** 3370,3373 ****
--- 3371,3377 ----
this->OSPlatform = unameInfo.machine;
}
+ #ifdef __APPLE__
+ this->CallSwVers();
+ #endif
#endif
***************
*** 3376,3379 ****
--- 3380,3407 ----
}
+ void SystemInformationImplementation::CallSwVers()
+ {
+ #ifdef __APPLE__
+ kwsys_stl::string output;
+ kwsys_stl::vector<const char*> args;
+ args.clear();
+ args.push_back("sw_vers");
+
+ args.push_back("-productName");
+ output = this->RunProcess(args);
+ this->OSName = output;
+ args.pop_back();
+
+ args.push_back("-productVersion");
+ output = this->RunProcess(args);
+ this->OSRelease = output;
+ args.pop_back();
+
+ args.push_back("-buildVersion");
+ output = this->RunProcess(args);
+ this->OSVersion = output;
+ #endif
+ }
+
/** Return true if the machine is 64 bits */
bool SystemInformationImplementation::Is64Bits()
More information about the Cmake-commits
mailing list