mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Fix $MACOSX_DEPLOYMENT_TARGET (#3337)
This commit is contained in:
parent
686cf20951
commit
1a926c9b7c
1 changed files with 12 additions and 3 deletions
|
@ -125,9 +125,18 @@ if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# Since 10.14, the XCode toolchain only accepts libc++ as the
|
# Since 10.14, the XCode toolchain only accepts libc++ as the
|
||||||
# standard library. This should also work on macOS starting from 10.9.
|
# standard library. We set it only on 10.14, because on some
|
||||||
|
# configurations of older macOS, we get the following error
|
||||||
|
# with libc++:
|
||||||
|
# [...]/usr/bin/c++ '-stdlib=libc++' -isysroot [...] -mmacosx-version-min=10.6 [...]
|
||||||
|
# clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
|
||||||
|
|
||||||
|
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)
|
||||||
|
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
|
||||||
|
message(STATUS "-- Darwin version = ${DARWIN_VERSION}")
|
||||||
|
if (DARWIN_VERSION GREATER 17)
|
||||||
set(pyarrow_ENV ${pyarrow_ENV} "CXXFLAGS='-stdlib=libc++'")
|
set(pyarrow_ENV ${pyarrow_ENV} "CXXFLAGS='-stdlib=libc++'")
|
||||||
set(pyarrow_ENV ${pyarrow_ENV} "MACOSX_DEPLOYMENT_TARGET=10.7")
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(pyarrow_ext
|
ExternalProject_Add(pyarrow_ext
|
||||||
|
|
Loading…
Add table
Reference in a new issue