Skip to content
Snippets Groups Projects
Commit 3eb3ad41 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: fix system info for mac

parent fc8d93cb
No related branches found
No related tags found
No related merge requests found
...@@ -26,13 +26,21 @@ ...@@ -26,13 +26,21 @@
#define printMethod(inof, m) kwsys_ios::cout << #m << ": " \ #define printMethod(inof, m) kwsys_ios::cout << #m << ": " \
<< info.m() << "\n" << info.m() << "\n"
#define printMethod2(inof, m, unit) kwsys_ios::cout << #m << ": " \
<< info.m() << " " << unit << "\n"
int testSystemInformation(int, char*[]) int testSystemInformation(int, char*[])
{ {
kwsys::SystemInformation info; kwsys::SystemInformation info;
printMethod(info, GetVendorString);
info.RunCPUCheck(); info.RunCPUCheck();
info.RunOSCheck(); info.RunOSCheck();
info.RunMemoryCheck(); info.RunMemoryCheck();
printMethod(info, GetOSName);
printMethod(info, GetHostname);
printMethod(info, GetOSRelease);
printMethod(info, GetOSVersion);
printMethod(info, GetOSPlatform);
printMethod(info, GetVendorString); printMethod(info, GetVendorString);
printMethod(info, GetVendorID); printMethod(info, GetVendorID);
printMethod(info, GetTypeID); printMethod(info, GetTypeID);
...@@ -40,24 +48,19 @@ int testSystemInformation(int, char*[]) ...@@ -40,24 +48,19 @@ int testSystemInformation(int, char*[])
printMethod(info, GetModelID); printMethod(info, GetModelID);
printMethod(info, GetExtendedProcessorName); printMethod(info, GetExtendedProcessorName);
printMethod(info, GetProcessorSerialNumber); printMethod(info, GetProcessorSerialNumber);
printMethod(info, GetProcessorCacheSize); printMethod2(info, GetProcessorCacheSize, "KB");
printMethod(info, GetLogicalProcessorsPerPhysical); printMethod(info, GetLogicalProcessorsPerPhysical);
printMethod(info, GetProcessorClockFrequency); printMethod2(info, GetProcessorClockFrequency, "MHz");
printMethod(info, GetProcessorAPICID);
printMethod(info, GetOSName);
printMethod(info, GetHostname);
printMethod(info, GetOSRelease);
printMethod(info, GetOSVersion);
printMethod(info, GetOSPlatform);
printMethod(info, Is64Bits); printMethod(info, Is64Bits);
printMethod(info, GetNumberOfLogicalCPU); printMethod(info, GetNumberOfLogicalCPU);
printMethod(info, GetNumberOfPhysicalCPU); printMethod(info, GetNumberOfPhysicalCPU);
printMethod(info, DoesCPUSupportCPUID); printMethod(info, DoesCPUSupportCPUID);
printMethod(info, GetTotalVirtualMemory); printMethod(info, GetProcessorAPICID);
printMethod(info, GetAvailableVirtualMemory); printMethod2(info, GetTotalVirtualMemory, "MB");
printMethod(info, GetTotalPhysicalMemory); printMethod2(info, GetAvailableVirtualMemory, "MB");
printMethod(info, GetAvailablePhysicalMemory); printMethod2(info, GetTotalPhysicalMemory, "MB");
printMethod2(info, GetAvailablePhysicalMemory, "MB");
//int GetProcessorCacheXSize(long int); //int GetProcessorCacheXSize(long int);
// bool DoesCPUSupportFeature(long int); // bool DoesCPUSupportFeature(long int);
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment