summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformTestsC.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-13 13:14:04 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-13 13:14:04 (GMT)
commitdf92617b7323978c0a8d589fd6b41fcc2c67613e (patch)
tree58c04ca80c87759109832df1ab7e50a631aeceaa /Source/kwsys/kwsysPlatformTestsC.c
parent18eec1153956c946ce48b33c3890e8862cdbd06c (diff)
parente44b0cb2f0d6d0065faabd510efdcfc6359a8025 (diff)
downloadCMake-df92617b7323978c0a8d589fd6b41fcc2c67613e.zip
CMake-df92617b7323978c0a8d589fd6b41fcc2c67613e.tar.gz
CMake-df92617b7323978c0a8d589fd6b41fcc2c67613e.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2017-10-12 (ef0ad34d)
Diffstat (limited to 'Source/kwsys/kwsysPlatformTestsC.c')
-rw-r--r--Source/kwsys/kwsysPlatformTestsC.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformTestsC.c b/Source/kwsys/kwsysPlatformTestsC.c
index 64a361b..5432633 100644
--- a/Source/kwsys/kwsysPlatformTestsC.c
+++ b/Source/kwsys/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__)