From 0c324a544515d68e4dabd007dd72b75a87c031a9 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Mon, 18 Sep 2023 14:35:28 +0200 Subject: [PATCH] fix: set `MACOSX_DEPLOYMENT_TARGET` in CI only --- .github/workflows/ci.yml | 4 ++-- src/CMakeLists.txt | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d7c24a387..cdf7ba18dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,7 +136,6 @@ jobs: os: macos-latest release: true shell: bash -euxo pipefail {0} - CMAKE_OPTIONS: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 llvm-url: https://github.com/leanprover/lean-llvm/releases/download/15.0.1/lean-llvm-x86_64-apple-darwin.tar.zst prepare-llvm: ../script/prepare-llvm-macos.sh lean-llvm* binary-check: otool -L @@ -146,7 +145,7 @@ jobs: release: true cross: true shell: bash -euxo pipefail {0} - CMAKE_OPTIONS: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DUSE_GMP=OFF -DLEAN_INSTALL_SUFFIX=-darwin_aarch64 + CMAKE_OPTIONS: -DUSE_GMP=OFF -DLEAN_INSTALL_SUFFIX=-darwin_aarch64 llvm-url: https://github.com/leanprover/lean-llvm/releases/download/15.0.1/lean-llvm-aarch64-apple-darwin.tar.zst https://github.com/leanprover/lean-llvm/releases/download/15.0.1/lean-llvm-x86_64-apple-darwin.tar.zst prepare-llvm: EXTRA_FLAGS=--target=aarch64-apple-darwin ../script/prepare-llvm-macos.sh lean-llvm-aarch64-* lean-llvm-x86_64-* binary-check: otool -L @@ -183,6 +182,7 @@ jobs: LSAN_OPTIONS: max_leaks=10 # somehow MinGW clang64 (or cmake?) defaults to `g++` even though it doesn't exist CXX: c++ + MACOSX_DEPLOYMENT_TARGET: 10.15 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a70269fe62..2c2425da5f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -449,9 +449,6 @@ string(APPEND LEANC_OPTS " ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}") if(CMAKE_OSX_SYSROOT AND NOT LEAN_STANDALONE) string(APPEND LEANC_OPTS " ${CMAKE_CXX_SYSROOT_FLAG}${CMAKE_OSX_SYSROOT}") endif() -if(CMAKE_OSX_DEPLOYMENT_TARGET) - string(APPEND LEANC_OPTS " ${CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}") -endif() if(${STAGE} GREATER 1) # reuse C++ parts, which don't change