File: Findfutimens.cmake

package info (click to toggle)
libgit2 1.9.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 60,804 kB
  • sloc: ansic: 203,436; javascript: 2,458; sh: 1,763; python: 384; perl: 99; php: 65; makefile: 33
file content (14 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
include(EnableWarnings)

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()