diff options
author | KWSys Robot <kwrobot@kitware.com> | 2012-10-01 18:58:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-10-01 19:02:39 (GMT) |
commit | 5d0de36d2b2f420ab58841bbcd47c45fcdc4486e (patch) | |
tree | 8cc5e0a3032c60cdc2f6c96d8fd00149df723954 /SystemInformation.hxx.in | |
parent | 7d3c2959fa9cb65b3be81bdfe3f69c29d31a9e67 (diff) | |
download | CMake-5d0de36d2b2f420ab58841bbcd47c45fcdc4486e.zip CMake-5d0de36d2b2f420ab58841bbcd47c45fcdc4486e.tar.gz CMake-5d0de36d2b2f420ab58841bbcd47c45fcdc4486e.tar.bz2 |
KWSys 2012-10-01 (bab53989)
Extract upstream KWSys using the following shell code.
$ sha1=bab53989d7c4027259bff837574f75003396d59f &&
git archive --prefix=KWSys-snapshot/ $sha1 |
tar x
$ git log 719638e2..bab53989 ^341043cf --no-merges --oneline --abbrev=8
bab53989 Tell Git to check tab-in-indent and no-lf-at-eof
8115bd1b SystemInformation: Pass extern "C" functions to sigaction
4f4dd224 SystemInformation: Fix unused assignment warnings
6b26d2fe SystemInformation: Use ifaddrs.h only where available
381923ed SystemInformation: Use si_code constants only where available
8f85338c SystemInformation: Use execinfo.h backtrace only where available
a8e98f98 SystemInformation: Use Windows API more portably
750b4b5c SystemInformation: Use long long or __int64 only where available
8d2cafcd SystemInformation: Fix UNIX system includes for FQDN
857bda17 SystemInformation: Report more information
63cbea35 Add and configure developer setup helper scripts
924466f5 SystemTools: Fix accidental bitwise instead of logical OR
2f423229 SystemTools: Remove unused environ declaration
a49c2417 Disable warnings about MS deprecation of C library
e3390720 CTestConfig: Submit to dedicated KWSys dashboard
Diffstat (limited to 'SystemInformation.hxx.in')
-rw-r--r-- | SystemInformation.hxx.in | 56 |
1 files changed, 46 insertions, 10 deletions
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in index b6ebe6a..cb6c759 100644 --- a/SystemInformation.hxx.in +++ b/SystemInformation.hxx.in @@ -25,13 +25,22 @@ namespace @KWSYS_NAMESPACE@ { -// forward declare the implementation class +// forward declare the implementation class class SystemInformationImplementation; - -class @KWSYS_NAMESPACE@_EXPORT SystemInformation -{ +class @KWSYS_NAMESPACE@_EXPORT SystemInformation +{ +#if @KWSYS_USE_LONG_LONG@ + typedef long long LongLong; +#elif @KWSYS_USE___INT64@ + typedef __int64 LongLong; +#else +# error "No Long Long" +#endif + friend class SystemInformationImplementation; + SystemInformationImplementation* Implementation; public: + SystemInformation (); ~SystemInformation (); @@ -40,6 +49,7 @@ public: kwsys_stl::string GetTypeID(); kwsys_stl::string GetFamilyID(); kwsys_stl::string GetModelID(); + kwsys_stl::string GetModelName(); kwsys_stl::string GetSteppingCode(); const char * GetExtendedProcessorName(); const char * GetProcessorSerialNumber(); @@ -49,13 +59,27 @@ public: int GetProcessorAPICID(); int GetProcessorCacheXSize(long int); bool DoesCPUSupportFeature(long int); - - const char * GetOSName(); + + // returns an informative general description of the cpu + // on this system. + kwsys_stl::string GetCPUDescription(); + const char * GetHostname(); + kwsys_stl::string GetFullyQualifiedDomainName(); + + const char * GetOSName(); const char * GetOSRelease(); const char * GetOSVersion(); const char * GetOSPlatform(); + int GetOSIsWindows(); + int GetOSIsLinux(); + int GetOSIsApple(); + + // returns an informative general description of the os + // on this system. + kwsys_stl::string GetOSDescription(); + bool Is64Bits(); unsigned int GetNumberOfLogicalCPU(); // per physical cpu @@ -63,19 +87,31 @@ public: bool DoesCPUSupportCPUID(); + // Retrieve id of the current running process + LongLong GetProcessId(); + // Retrieve memory information in megabyte. size_t GetTotalVirtualMemory(); size_t GetAvailableVirtualMemory(); size_t GetTotalPhysicalMemory(); - size_t GetAvailablePhysicalMemory(); + size_t GetAvailablePhysicalMemory(); + + // returns an informative general description if the ram + // on this system + kwsys_stl::string GetMemoryDescription(); + + // Retrieve physical memory information in kib + LongLong GetMemoryTotal(); + LongLong GetMemoryUsed(); + + // enable/disable stack trace signal handler. + static + void SetStackTraceOnError(int enable); /** Run the different checks */ void RunCPUCheck(); void RunOSCheck(); void RunMemoryCheck(); -private: - SystemInformationImplementation* Implementation; - }; } // namespace @KWSYS_NAMESPACE@ |