diff --git a/recipe/build-abseil.sh b/recipe/build-abseil.sh index f67edf4..a1533e0 100644 --- a/recipe/build-abseil.sh +++ b/recipe/build-abseil.sh @@ -13,6 +13,12 @@ fi if [[ "$PKG_NAME" == "libabseil-tests" ]]; then CMAKE_ARGS="${CMAKE_ARGS} -DBUILD_TESTING=ON -DABSL_BUILD_TESTING=ON" CMAKE_ARGS="${CMAKE_ARGS} -DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_FIND_GOOGLETEST=ON" + if [[ "${target_platform}" == osx-* ]]; then + # test targets require C11's aligned_alloc, which doesn't compile even + # with a newer MACOSX_SDK_VERSION; need to bump target version too + CMAKE_ARGS="$(echo $CMAKE_ARGS | sed 's/-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 //g')" + CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" + fi fi cmake -G Ninja \ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1c147f2..9b78321 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -147,6 +147,9 @@ outputs: run: - gtest - {{ pin_subpackage("libabseil", exact=True) }} + run_constrained: + # only for libabseil-tests, see build-abseil.sh + - __osx >=10.13 # [osx and x86_64] test: requires: