summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/cmake-utils.eclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index d035e0459f23..02b06bb3df89 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -660,8 +660,19 @@ _ninjaopts_from_makeopts() {
while (( $# )); do
case $1 in
-j|-l)
- ninjaopts+=( $1 $2 )
- shift 2
+ if [[ $# -eq 1 || $2 == -* ]]; then
+ if [[ $1 == -j ]]; then
+ # absurdly high job limit
+ ninjaopts+=( $1 9999 )
+ else # -l
+ # remove load limit (like make does for -l)
+ ninjaopts+=( $1 0 )
+ fi
+ shift 1
+ else
+ ninjaopts+=( $1 $2 )
+ shift 2
+ fi
;;
-j*|-l*)
ninjaopts+=( $1 )