1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: testSystemInformation.cxx,v $
6 Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
13 =========================================================================*/
14 #include "kwsysPrivate.h"
15 #include KWSYS_HEADER(SystemInformation.hxx)
16 #include KWSYS_HEADER(ios/iostream)
20 // Work-around CMake dependency scanning limitation. This must
21 // duplicate the above list of headers.
23 # include "SystemInformation.hxx.in"
24 # include "kwsys_ios_iostream.h.in"
27 #define printMethod(inof, m) kwsys_ios::cout << #m << ": " \
29 int testSystemInformation(int, char*[])
31 kwsys::SystemInformation info
;
32 printMethod(info
, GetVendorString
);
35 info
.RunMemoryCheck();
36 printMethod(info
, GetVendorString
);
37 printMethod(info
, GetVendorID
);
38 printMethod(info
, GetTypeID
);
39 printMethod(info
, GetFamilyID
);
40 printMethod(info
, GetModelID
);
41 printMethod(info
, GetExtendedProcessorName
);
42 printMethod(info
, GetProcessorSerialNumber
);
43 printMethod(info
, GetProcessorCacheSize
);
44 printMethod(info
, GetLogicalProcessorsPerPhysical
);
45 printMethod(info
, GetProcessorClockFrequency
);
46 printMethod(info
, GetProcessorAPICID
);
47 printMethod(info
, GetOSName
);
48 printMethod(info
, GetHostname
);
49 printMethod(info
, GetOSRelease
);
50 printMethod(info
, GetOSVersion
);
51 printMethod(info
, GetOSPlatform
);
52 printMethod(info
, Is64Bits
);
53 printMethod(info
, GetNumberOfLogicalCPU
);
54 printMethod(info
, GetNumberOfPhysicalCPU
);
55 printMethod(info
, DoesCPUSupportCPUID
);
56 printMethod(info
, GetTotalVirtualMemory
);
57 printMethod(info
, GetAvailableVirtualMemory
);
58 printMethod(info
, GetTotalPhysicalMemory
);
59 printMethod(info
, GetAvailablePhysicalMemory
);
61 //int GetProcessorCacheXSize(long int);
62 // bool DoesCPUSupportFeature(long int);