ENH: fix system info for mac
This commit is contained in:
parent
d3d33a3549
commit
ee3d395fde
|
@ -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*[])
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue