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 @@
#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;
......
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