From 882af4d1fe2707d6449dd47170f8a2f37a14f761 Mon Sep 17 00:00:00 2001 From: "Kevin J. Lynagh" Date: Tue, 17 Mar 2026 20:15:39 +0100 Subject: [PATCH 1/3] CMake: Accept ignored prefixes from build_release_macos.sh Defaults to ignore: /opt/local (MacPorts) /opt/homebrew (Homebrew on ARM) /opt/local (Homebrew on x86) We want to ignore these paths so any dependencies they might contain don't interfere with the build. This fixes https://github.com/OrcaSlicer/OrcaSlicer/issues/10460 --- build_release_macos.sh | 13 ++++++++++++- deps/CMakeLists.txt | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/build_release_macos.sh b/build_release_macos.sh index dffeb3d4b1..4fca109877 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -3,7 +3,7 @@ set -e set -o pipefail -while getopts ":dpa:snt:xbc:1Tuh" opt; do +while getopts ":dpa:snt:xbc:i:1Tuh" opt; do case "${opt}" in d ) export BUILD_TARGET="deps" @@ -34,6 +34,9 @@ while getopts ":dpa:snt:xbc:1Tuh" opt; do c ) export BUILD_CONFIG="$OPTARG" ;; + i ) + export CMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH:+$CMAKE_IGNORE_PREFIX_PATH;}$OPTARG" + ;; 1 ) export CMAKE_BUILD_PARALLEL_LEVEL=1 ;; @@ -53,6 +56,7 @@ while getopts ":dpa:snt:xbc:1Tuh" opt; do echo " -x: Use Ninja Multi-Config CMake generator, default is Xcode" echo " -b: Build without reconfiguring CMake" echo " -c: Set CMake build configuration, default is Release" + echo " -i: Add a prefix to ignore during CMake dependency discovery (repeatable), defaults to /opt/local:/usr/local:/opt/homebrew" echo " -1: Use single job for building" echo " -T: Build and run tests" exit 0 @@ -93,6 +97,10 @@ if [ -z "$OSX_DEPLOYMENT_TARGET" ]; then export OSX_DEPLOYMENT_TARGET="11.3" fi +if [ -z "$CMAKE_IGNORE_PREFIX_PATH" ]; then + export CMAKE_IGNORE_PREFIX_PATH="/opt/local:/usr/local:/opt/homebrew" +fi + CMAKE_VERSION=$(cmake --version | head -1 | sed 's/[^0-9]*\([0-9]*\).*/\1/') if [ "$CMAKE_VERSION" -ge 4 ] 2>/dev/null; then export CMAKE_POLICY_VERSION_MINIMUM=3.5 @@ -108,6 +116,7 @@ echo " - BUILD_CONFIG: $BUILD_CONFIG" echo " - BUILD_TARGET: $BUILD_TARGET" echo " - CMAKE_GENERATOR: $SLICER_CMAKE_GENERATOR for Slicer, $DEPS_CMAKE_GENERATOR for deps" echo " - OSX_DEPLOYMENT_TARGET: $OSX_DEPLOYMENT_TARGET" +echo " - CMAKE_IGNORE_PREFIX_PATH: $CMAKE_IGNORE_PREFIX_PATH" echo # if which -s brew; then @@ -151,6 +160,7 @@ function build_deps() { -DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \ -DCMAKE_OSX_ARCHITECTURES:STRING="${_ARCH}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \ + -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \ ${CMAKE_POLICY_COMPAT} fi cmake --build . --config "$BUILD_CONFIG" --target deps @@ -192,6 +202,7 @@ function build_slicer() { -DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \ -DCMAKE_OSX_ARCHITECTURES="${_ARCH}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \ + -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \ ${CMAKE_POLICY_COMPAT} fi cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET" diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 1826c029d0..a90de994db 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -185,6 +185,7 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE) -DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR} -DCMAKE_MODULE_PATH:STRING=${PROJECT_SOURCE_DIR}/../cmake/modules -DCMAKE_PREFIX_PATH:STRING=${DESTDIR} + -DCMAKE_IGNORE_PREFIX_PATH:STRING=${CMAKE_IGNORE_PREFIX_PATH} -DCMAKE_DEBUG_POSTFIX:STRING=d -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} @@ -232,6 +233,7 @@ else() -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR} -DCMAKE_PREFIX_PATH:STRING=${DESTDIR} + -DCMAKE_IGNORE_PREFIX_PATH:STRING=${CMAKE_IGNORE_PREFIX_PATH} -DBUILD_SHARED_LIBS:BOOL=OFF ${_cmake_osx_arch} "${_configs_line}" From 4ffe2602283f65c6f20660ded189352c55b1fb35 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Thu, 19 Mar 2026 15:48:32 +0800 Subject: [PATCH 2/3] update cmake to 4.3.x --- .github/workflows/build_all.yml | 4 +++- .github/workflows/build_deps.yml | 4 +++- .github/workflows/build_orca.yml | 4 +++- deps/OCCT/OCCT.cmake | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 41fe9d2302..452e7cfafd 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -114,7 +114,9 @@ jobs: name: ${{ github.sha }}-tests - uses: lukka/get-cmake@latest with: - cmakeVersion: "~3.28.0" # use most recent 3.28.x version + cmakeVersion: "~4.3.0" # use most recent 4.3.x version + useLocalCache: true # <--= Use the local cache (default is 'false'). + useCloudCache: false # <--= Ditch the cloud cache (default is 'true'). - name: Unpackage and Run Unit Tests timeout-minutes: 20 run: | diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index 0e21091be4..63505b187c 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -46,7 +46,9 @@ jobs: - uses: lukka/get-cmake@latest with: - cmakeVersion: "~3.28.0" # use most recent 3.28.x version + cmakeVersion: "~4.3.0" # use most recent 4.3.x version + useLocalCache: true # <--= Use the local cache (default is 'false'). + useCloudCache: false # <--= Ditch the cloud cache (default is 'true'). - name: setup dev on Windows if: inputs.os == 'windows-latest' diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 3cc89d30a7..5c6492ded6 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -44,7 +44,9 @@ jobs: - uses: lukka/get-cmake@latest with: - cmakeVersion: "~3.28.0" # use most recent 3.28.x version + cmakeVersion: "~4.3.0" # use most recent 4.3.x version + useLocalCache: true # <--= Use the local cache (default is 'false'). + useCloudCache: false # <--= Ditch the cloud cache (default is 'true'). - name: Get the version and date on Ubuntu and macOS if: inputs.os != 'windows-latest' diff --git a/deps/OCCT/OCCT.cmake b/deps/OCCT/OCCT.cmake index 98c6efc98d..b4cd9facd2 100644 --- a/deps/OCCT/OCCT.cmake +++ b/deps/OCCT/OCCT.cmake @@ -16,6 +16,7 @@ orcaslicer_add_cmake_project(OCCT #DEPENDS dep_Boost DEPENDS ${FREETYPE_PKG} CMAKE_ARGS + -DCMAKE_CXX_STANDARD=17 -DBUILD_LIBRARY_TYPE=${library_build_type} -DUSE_TK=OFF -DUSE_TBB=OFF From 838605690b289c989ac81d6d509cae57475cb2fb Mon Sep 17 00:00:00 2001 From: SoftFever Date: Thu, 19 Mar 2026 16:08:44 +0800 Subject: [PATCH 3/3] minor change --- .github/workflows/build_all.yml | 2 +- .github/workflows/build_deps.yml | 2 +- .github/workflows/build_orca.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 452e7cfafd..2bf01a0f65 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -116,7 +116,7 @@ jobs: with: cmakeVersion: "~4.3.0" # use most recent 4.3.x version useLocalCache: true # <--= Use the local cache (default is 'false'). - useCloudCache: false # <--= Ditch the cloud cache (default is 'true'). + useCloudCache: true - name: Unpackage and Run Unit Tests timeout-minutes: 20 run: | diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index 63505b187c..b43e71e535 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -48,7 +48,7 @@ jobs: with: cmakeVersion: "~4.3.0" # use most recent 4.3.x version useLocalCache: true # <--= Use the local cache (default is 'false'). - useCloudCache: false # <--= Ditch the cloud cache (default is 'true'). + useCloudCache: true - name: setup dev on Windows if: inputs.os == 'windows-latest' diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 5c6492ded6..ac85a0805b 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -46,8 +46,8 @@ jobs: with: cmakeVersion: "~4.3.0" # use most recent 4.3.x version useLocalCache: true # <--= Use the local cache (default is 'false'). - useCloudCache: false # <--= Ditch the cloud cache (default is 'true'). - + useCloudCache: true + - name: Get the version and date on Ubuntu and macOS if: inputs.os != 'windows-latest' run: |