mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:11:07 +08:00
[vcpkg] Optionally limit the number of cores during vcpkg bootstrap (#19010)
* limit the number of cores during vcpkg bootstrap * Switch to VCPKG_MAX_CONCURRENCY
This commit is contained in:
parent
c8441af7e0
commit
593c26c08c
@ -299,8 +299,13 @@ echo "Building vcpkg-tool..."
|
||||
rm -rf "$baseBuildDir"
|
||||
mkdir -p "$buildDir"
|
||||
vcpkgExtractArchive "$tarballPath" "$srcBaseDir"
|
||||
cmakeConfigOptions="-DCMAKE_BUILD_TYPE=Release -G 'Ninja' -DCMAKE_MAKE_PROGRAM='$ninjaExe'"
|
||||
|
||||
(cd "$buildDir" && CXX="$CXX" "$cmakeExe" "$srcDir" -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1
|
||||
if [ "${VCPKG_MAX_CONCURRENCY}" != "" ] ; then
|
||||
cmakeConfigOptions=" $cmakeConfigOptions '-DCMAKE_JOB_POOL_COMPILE:STRING=compile' '-DCMAKE_JOB_POOL_LINK:STRING=link' '-DCMAKE_JOB_POOLS:STRING=compile=$VCPKG_MAX_CONCURRENCY;link=$VCPKG_MAX_CONCURRENCY' "
|
||||
fi
|
||||
|
||||
(cd "$buildDir" && eval CXX="$CXX" "$cmakeExe" "$srcDir" $cmakeConfigOptions "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1
|
||||
(cd "$buildDir" && "$cmakeExe" --build .) || exit 1
|
||||
|
||||
rm -rf "$vcpkgRootDir/vcpkg"
|
||||
|
Loading…
Reference in New Issue
Block a user