summaryrefslogtreecommitdiff
path: root/cmake/Findfutimens.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Findfutimens.cmake')
-rw-r--r--cmake/Findfutimens.cmake16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmake/Findfutimens.cmake b/cmake/Findfutimens.cmake
index 73b79528a..3449c9d54 100644
--- a/cmake/Findfutimens.cmake
+++ b/cmake/Findfutimens.cmake
@@ -1,14 +1,14 @@
-INCLUDE(EnableWarnings)
+include(EnableWarnings)
-IF (APPLE)
+if(APPLE)
# We cannot simply CHECK_FUNCTION_EXISTS on macOS because
# MACOSX_DEPLOYMENT_TARGET may be set to a version in the past
# that doesn't have futimens. Instead we need to enable warnings
# as errors, then check for the symbol existing in `sys/stat.h`,
# then reset warnings as errors.
- ENABLE_WARNINGS(error)
- CHECK_SYMBOL_EXISTS(futimens sys/stat.h HAVE_FUTIMENS)
- DISABLE_WARNINGS(error)
-ELSE ()
- CHECK_FUNCTION_EXISTS(futimens HAVE_FUTIMENS)
-ENDIF ()
+ enable_warnings(error)
+ check_symbol_exists(futimens sys/stat.h HAVE_FUTIMENS)
+ disable_warnings(error)
+else()
+ check_function_exists(futimens HAVE_FUTIMENS)
+endif()