diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-05-19 20:35:57 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-05-19 20:35:57 (GMT) |
commit | ee3d395fdeff34fec58c155cfd2cb5a3c1a843d9 (patch) | |
tree | 83d90f40301392a70a73c877bc217f025c53af8d /Source/kwsys/testSystemInformation.cxx | |
parent | d3d33a3549098a8d08209839430df943cef63ab4 (diff) | |
download | CMake-ee3d395fdeff34fec58c155cfd2cb5a3c1a843d9.zip CMake-ee3d395fdeff34fec58c155cfd2cb5a3c1a843d9.tar.gz CMake-ee3d395fdeff34fec58c155cfd2cb5a3c1a843d9.tar.bz2 |
ENH: fix system info for mac
Diffstat (limited to 'Source/kwsys/testSystemInformation.cxx')
-rw-r--r-- | Source/kwsys/testSystemInformation.cxx | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/Source/kwsys/testSystemInformation.cxx b/Source/kwsys/testSystemInformation.cxx index 84ed5f6..09b50ac 100644 --- a/Source/kwsys/testSystemInformation.cxx +++ b/Source/kwsys/testSystemInformation.cxx @@ -26,13 +26,21 @@ #define printMethod(inof, m) kwsys_ios::cout << #m << ": " \ << info.m() << "\n" + +#define printMethod2(inof, m, unit) kwsys_ios::cout << #m << ": " \ +<< info.m() << " " << unit << "\n" + int testSystemInformation(int, char*[]) { kwsys::SystemInformation info; - printMethod(info, GetVendorString); info.RunCPUCheck(); info.RunOSCheck(); info.RunMemoryCheck(); + printMethod(info, GetOSName); + printMethod(info, GetHostname); + printMethod(info, GetOSRelease); + printMethod(info, GetOSVersion); + printMethod(info, GetOSPlatform); printMethod(info, GetVendorString); printMethod(info, GetVendorID); printMethod(info, GetTypeID); @@ -40,24 +48,19 @@ int testSystemInformation(int, char*[]) printMethod(info, GetModelID); printMethod(info, GetExtendedProcessorName); printMethod(info, GetProcessorSerialNumber); - printMethod(info, GetProcessorCacheSize); + printMethod2(info, GetProcessorCacheSize, "KB"); printMethod(info, GetLogicalProcessorsPerPhysical); - printMethod(info, GetProcessorClockFrequency); - printMethod(info, GetProcessorAPICID); - printMethod(info, GetOSName); - printMethod(info, GetHostname); - printMethod(info, GetOSRelease); - printMethod(info, GetOSVersion); - printMethod(info, GetOSPlatform); + printMethod2(info, GetProcessorClockFrequency, "MHz"); printMethod(info, Is64Bits); printMethod(info, GetNumberOfLogicalCPU); printMethod(info, GetNumberOfPhysicalCPU); printMethod(info, DoesCPUSupportCPUID); - printMethod(info, GetTotalVirtualMemory); - printMethod(info, GetAvailableVirtualMemory); - printMethod(info, GetTotalPhysicalMemory); - printMethod(info, GetAvailablePhysicalMemory); - + printMethod(info, GetProcessorAPICID); + printMethod2(info, GetTotalVirtualMemory, "MB"); + printMethod2(info, GetAvailableVirtualMemory, "MB"); + printMethod2(info, GetTotalPhysicalMemory, "MB"); + printMethod2(info, GetAvailablePhysicalMemory, "MB"); + //int GetProcessorCacheXSize(long int); // bool DoesCPUSupportFeature(long int); return 0; |