@@ -182,6 +182,7 @@ KNOWN_SETTINGS=(
182
182
darwin-toolchain-application-cert " " " Application Cert name to codesign xctoolchain"
183
183
darwin-toolchain-installer-cert " " " Installer Cert name to create installer pkg"
184
184
darwin-toolchain-installer-package " " " The path to installer pkg"
185
+ build-jobs " " " The number of parallel build jobs to use"
185
186
186
187
)
187
188
@@ -1049,9 +1050,16 @@ case "${CMAKE_GENERATOR}" in
1049
1050
if [[ " ${VERBOSE_BUILD} " ]] ; then
1050
1051
BUILD_ARGS=" ${BUILD_ARGS} -v"
1051
1052
fi
1053
+ if [[ " ${BUILD_JOBS} " ]] ; then
1054
+ BUILD_ARGS=" ${BUILD_ARGS} -j${BUILD_JOBS} "
1055
+ fi
1052
1056
;;
1053
1057
' Unix Makefiles' )
1054
- BUILD_ARGS=" ${BUILD_ARGS:- -j$(get_make_parallelism)} "
1058
+ if [[ " ${BUILD_JOBS} " ]] ; then
1059
+ BUILD_ARGS=" ${BUILD_ARGS} -j${BUILD_JOBS} "
1060
+ else
1061
+ BUILD_ARGS=" ${BUILD_ARGS:- -j$(get_make_parallelism)} "
1062
+ fi
1055
1063
if [[ " ${VERBOSE_BUILD} " ]] ; then
1056
1064
BUILD_ARGS=" ${BUILD_ARGS} VERBOSE=1"
1057
1065
fi
@@ -1061,6 +1069,9 @@ case "${CMAKE_GENERATOR}" in
1061
1069
# but since we're not using proper Xcode 4 schemes, this is the
1062
1070
# only way to get target-level parallelism.
1063
1071
BUILD_ARGS=" ${BUILD_ARGS} -parallelizeTargets"
1072
+ if [[ " ${BUILD_JOBS} " ]] ; then
1073
+ BUILD_ARGS=" ${BUILD_ARGS} -jobs ${BUILD_JOBS} "
1074
+ fi
1064
1075
BUILD_TARGET_FLAG=" -target"
1065
1076
COMMON_CMAKE_OPTIONS=(
1066
1077
" ${COMMON_CMAKE_OPTIONS[@]} "
0 commit comments