ENH: fix system info for mac

This commit is contained in:
Bill Hoffman 2009-05-19 16:35:57 -04:00
parent d3d33a3549
commit ee3d395fde
1 changed files with 17 additions and 14 deletions

View File

@ -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,23 +48,18 @@ 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);