deps builld: Try to honour CMAKE_BUILD_PARALLEL_LEVEL (#13158)

* deps: Use CMAKE_BUILD_PARALLEL_LEVEL for dependency builds.

If set when initial CMake is run, don't hard-code the number of CPUs for all the
recursive child builds.

* build_linux: Pass -j1 for dependency build.

This is recommended by the comment at the top of deps/CMakeLists.txt, and makes
sense as the recursive build steps will pick up
CMAKE_BUILD_PARALLEL_LEVEL (otherwise the number of parallel jobs is squared).
This commit is contained in:
Angus Gratton
2026-04-17 14:34:35 +10:00
committed by GitHub
parent a394ba696c
commit b88a314763
2 changed files with 12 additions and 5 deletions

View File

@@ -517,7 +517,7 @@ if [[ -n "${BUILD_DEPS}" ]] ; then
fi
print_and_run cmake -S deps -B deps/$BUILD_DIR "${CMAKE_C_CXX_COMPILER_CLANG[@]}" "${CMAKE_LLD_LINKER_ARGS[@]}" -G Ninja "${COLORED_OUTPUT}" "${BUILD_ARGS[@]}"
print_and_run cmake --build deps/$BUILD_DIR
print_and_run cmake --build deps/$BUILD_DIR -j1
fi
if [[ -n "${BUILD_ORCA}" ]] || [[ -n "${BUILD_TESTS}" ]] ; then