From eb48c7bc6ae9bfcbce7e9bdb2155bfd0015df169 Mon Sep 17 00:00:00 2001 From: Hanif Koh Date: Thu, 10 Sep 2026 18:23:30 +0800 Subject: [PATCH] Forward ORCA_EXTRA_BUILD_ARGS from the macOS and Windows build scripts build_linux.sh already passes this variable to the slicer configure, so CI can add a CMake option without editing three scripts. The macOS script reads it into an array the way build_linux.sh does. --- build_release_macos.sh | 4 +++- build_release_vs.bat | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build_release_macos.sh b/build_release_macos.sh index b1de5df2e4..f8702385fa 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -255,6 +255,7 @@ function build_slicer() { mkdir -p "$PROJECT_BUILD_DIR" cd "$PROJECT_BUILD_DIR" if [ "1." != "$BUILD_ONLY". ]; then + read -r -a EXTRA_BUILD_ARGS <<< "${ORCA_EXTRA_BUILD_ARGS:-}" cmake "${PROJECT_DIR}" \ -G "${SLICER_CMAKE_GENERATOR}" \ -DORCA_TOOLS=ON \ @@ -264,7 +265,8 @@ function build_slicer() { -DCMAKE_OSX_ARCHITECTURES="${_ARCH}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \ -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \ - ${CMAKE_POLICY_COMPAT} + ${CMAKE_POLICY_COMPAT} \ + "${EXTRA_BUILD_ARGS[@]}" fi cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET" ) diff --git a/build_release_vs.bat b/build_release_vs.bat index 3842f1d198..aad942f7ad 100644 --- a/build_release_vs.bat +++ b/build_release_vs.bat @@ -164,10 +164,10 @@ cd %build_dir% echo on set CMAKE_POLICY_VERSION_MINIMUM=3.5 if "%USE_NINJA%"=="1" ( - cmake .. -G %CMAKE_GENERATOR% %CLANG_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% + cmake .. -G %CMAKE_GENERATOR% %CLANG_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% %ORCA_EXTRA_BUILD_ARGS% cmake --build . --config %build_type% --target all ) else ( - cmake .. -G %CMAKE_GENERATOR% -A %arch% %TOOLSET_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% + cmake .. -G %CMAKE_GENERATOR% -A %arch% %TOOLSET_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% %ORCA_EXTRA_BUILD_ARGS% cmake --build . --config %build_type% --target ALL_BUILD -- -m ) @echo off