summaryrefslogtreecommitdiffstats
path: root/kwsysPlatformTestsC.c
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2017-10-12 10:59:48 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-13 13:13:56 (GMT)
commite44b0cb2f0d6d0065faabd510efdcfc6359a8025 (patch)
tree44cb77d27a0ec8e7bf3643397f01f43f0ee52b94 /kwsysPlatformTestsC.c
parentc551ff588b48cc4c286922779651890da0f3c22c (diff)
downloadCMake-e44b0cb2f0d6d0065faabd510efdcfc6359a8025.zip
CMake-e44b0cb2f0d6d0065faabd510efdcfc6359a8025.tar.gz
CMake-e44b0cb2f0d6d0065faabd510efdcfc6359a8025.tar.bz2
KWSys 2017-10-12 (ef0ad34d)
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit ef0ad34d280f0553fc4f6e7202a5e7d6241cdc9c (master). Upstream Shortlog ----------------- Rolf Eike Beer (2): 8717ac15 DynamicLoader: use std::string instead of strcpy() + strcat() 88d4dd4b CommandLineArguments: use std::string in GenerateHelp() Wouter Klouwen (1): 749b7506 ProcessUNIX: Use monotonic clock in kwsysProcessTimeGetCurrent() for POSIX
Diffstat (limited to 'kwsysPlatformTestsC.c')
-rw-r--r--kwsysPlatformTestsC.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kwsysPlatformTestsC.c b/kwsysPlatformTestsC.c
index 64a361b..5432633 100644
--- a/kwsysPlatformTestsC.c
+++ b/kwsysPlatformTestsC.c
@@ -55,6 +55,21 @@ int KWSYS_PLATFORM_TEST_C_MAIN()
}
#endif
+#ifdef TEST_KWSYS_C_HAS_CLOCK_GETTIME_MONOTONIC
+#if defined(__APPLE__)
+#include <AvailabilityMacros.h>
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
+#error "clock_gettime not available on macOS < 10.12"
+#endif
+#endif
+#include <time.h>
+int KWSYS_PLATFORM_TEST_C_MAIN()
+{
+ struct timespec ts;
+ return clock_gettime(CLOCK_MONOTONIC, &ts);
+}
+#endif
+
#ifdef TEST_KWSYS_C_TYPE_MACROS
char* info_macros =
#if defined(__SIZEOF_SHORT__)