summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testSystemInformation.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-14 15:17:22 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-14 15:18:31 (GMT)
commit95a9c80cacea50e2b5d52d67d0a7f5c9b50192dd (patch)
tree05d5e8dfb1b303549ba5f3570eb6ec903e95c97f /Source/kwsys/testSystemInformation.cxx
parentbaa33acbdaa3bf88fe1fc591562574ab43b056fe (diff)
parent765386279815f208c5f83b1ad2b66776e990feb9 (diff)
downloadCMake-95a9c80cacea50e2b5d52d67d0a7f5c9b50192dd.zip
CMake-95a9c80cacea50e2b5d52d67d0a7f5c9b50192dd.tar.gz
CMake-95a9c80cacea50e2b5d52d67d0a7f5c9b50192dd.tar.bz2
Merge topic 'LINK_LIBRARIES-property' into rpath-use-implicit-link-dirs
Resolve a logical conflict in the signature of cmTarget::GetLinkClosure.
Diffstat (limited to 'Source/kwsys/testSystemInformation.cxx')
-rw-r--r--Source/kwsys/testSystemInformation.cxx35
1 files changed, 31 insertions, 4 deletions
diff --git a/Source/kwsys/testSystemInformation.cxx b/Source/kwsys/testSystemInformation.cxx
index b3afc9d..cfd7ce2 100644
--- a/Source/kwsys/testSystemInformation.cxx
+++ b/Source/kwsys/testSystemInformation.cxx
@@ -13,8 +13,6 @@
#include KWSYS_HEADER(SystemInformation.hxx)
#include KWSYS_HEADER(ios/iostream)
-
-
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
@@ -22,12 +20,31 @@
# include "kwsys_ios_iostream.h.in"
#endif
-#define printMethod(inof, m) kwsys_ios::cout << #m << ": " \
+#if defined(KWSYS_USE_LONG_LONG)
+# if defined(KWSYS_IOS_HAS_OSTREAM_LONG_LONG)
+# define iostreamLongLong(x) (x)
+# else
+# define iostreamLongLong(x) ((long)x)
+# endif
+#elif defined(KWSYS_USE___INT64)
+# if defined(KWSYS_IOS_HAS_OSTREAM___INT64)
+# define iostreamLongLong(x) (x)
+# else
+# define iostreamLongLong(x) ((long)x)
+# endif
+#else
+# error "No Long Long"
+#endif
+
+#define printMethod(info, m) kwsys_ios::cout << #m << ": " \
<< info.m() << "\n"
-#define printMethod2(inof, m, unit) kwsys_ios::cout << #m << ": " \
+#define printMethod2(info, m, unit) kwsys_ios::cout << #m << ": " \
<< info.m() << " " << unit << "\n"
+#define printMethod3(info, m, unit) kwsys_ios::cout << #m << ": " \
+<< iostreamLongLong(info.m) << " " << unit << "\n"
+
int testSystemInformation(int, char*[])
{
kwsys::SystemInformation info;
@@ -35,7 +52,11 @@ int testSystemInformation(int, char*[])
info.RunOSCheck();
info.RunMemoryCheck();
printMethod(info, GetOSName);
+ printMethod(info, GetOSIsLinux);
+ printMethod(info, GetOSIsApple);
+ printMethod(info, GetOSIsWindows);
printMethod(info, GetHostname);
+ printMethod(info, GetFullyQualifiedDomainName);
printMethod(info, GetOSRelease);
printMethod(info, GetOSVersion);
printMethod(info, GetOSPlatform);
@@ -45,6 +66,7 @@ int testSystemInformation(int, char*[])
printMethod(info, GetFamilyID);
printMethod(info, GetModelID);
printMethod(info, GetExtendedProcessorName);
+ printMethod(info, GetSteppingCode);
printMethod(info, GetProcessorSerialNumber);
printMethod2(info, GetProcessorCacheSize, "KB");
printMethod(info, GetLogicalProcessorsPerPhysical);
@@ -58,6 +80,11 @@ int testSystemInformation(int, char*[])
printMethod2(info, GetAvailableVirtualMemory, "MB");
printMethod2(info, GetTotalPhysicalMemory, "MB");
printMethod2(info, GetAvailablePhysicalMemory, "MB");
+ printMethod3(info, GetHostMemoryTotal(), "KiB");
+ printMethod3(info, GetHostMemoryAvailable("KWSHL"), "KiB");
+ printMethod3(info, GetProcMemoryAvailable("KWSHL","KWSPL"), "KiB");
+ printMethod3(info, GetHostMemoryUsed(), "KiB");
+ printMethod3(info, GetProcMemoryUsed(), "KiB");
//int GetProcessorCacheXSize(long int);
// bool DoesCPUSupportFeature(long int);