]> git.proxmox.com Git - libgit2.git/blob - cmake/Findfutimens.cmake
Update upstream source from tag 'upstream/1.5.0+ds'
[libgit2.git] / cmake / Findfutimens.cmake
1 include(EnableWarnings)
2
3 if(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)
12 else()
13 check_function_exists(futimens HAVE_FUTIMENS)
14 endif()