]> git.proxmox.com Git - libgit2.git/blame - cmake/Findfutimens.cmake
Reupload to unstable
[libgit2.git] / cmake / Findfutimens.cmake
CommitLineData
c25aa7cd
PP
1INCLUDE(EnableWarnings)
2
3IF (APPLE)
4 # We cannot simply CHECK_FUNCTION_EXISTS on macOS because
5 # MACOSX_DEPLOYMENT_TARGET may be set to a version in the past
6 # that doesn't have futimens. Instead we need to enable warnings
7 # as errors, then check for the symbol existing in `sys/stat.h`,
8 # then reset warnings as errors.
9 ENABLE_WARNINGS(error)
10 CHECK_SYMBOL_EXISTS(futimens sys/stat.h HAVE_FUTIMENS)
11 DISABLE_WARNINGS(error)
12ELSE ()
13 CHECK_FUNCTION_EXISTS(futimens HAVE_FUTIMENS)
14ENDIF ()