-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid check for availability of futimens function for macOS platform #5856
Comments
What version of cmake? It claims to honor the deployment target version for |
I use Cmake 3.20.2 (Installed from Homebrew) #!/bin/sh
export MACOSX_DEPLOYMENT_TARGET=10.10
rm -rf "xcode"
mkdir "xcode"
cd "xcode"
cmake -G "Xcode" ..
open "libgit2.xcodeproj" Open Xcode 12.5 and build git2 target. |
Could you confirm that my test by Xcode project is relevant? |
I can confirm that something is fishy, here's the output from a run of libgit2/objective-git, that builds with |
I posted a question about this issue at CMake forums. And at one moment I figured out that I do something wrong. They are different. Generated file doesn't include headers to search for. I suggested to use enable_warnings(error)
check_symbol_exists(futimens sys/stat.h HAVE_FUTIMENS)
# check_function_exists(futimens HAVE_FUTIMENS)
IF (HAVE_FUTIMENS)
SET(GIT_USE_FUTIMENS 1)
ENDIF()
#message(FATAL_ERROR) |
@ethomson
|
Reproduction steps
Open src/unix/posix.h
Expected behavior
Everything works fine.
Actual behavior
Xcode warning:
futimens
is only available for macOS 10.13 or newer.I build it for a project with minimum deployment target 10.10.
Version of libgit2 (release number or SHA1)
Latest master.
Operating system(s) tested
macOS 10.16
Xcode 12.5
The text was updated successfully, but these errors were encountered: