summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-02-28 19:42:18 +0100
committerMichael Palimaka <kensington@gentoo.org>2016-05-26 18:12:49 +1000
commit583a1bead82e2a20d396c425a2d74b7b8f9b93a9 (patch)
treeb43d4034371ba75cebbe9aa255ee4743e894cb6d
parent3b17d658fe15cf1cee822168fb15522e47c487c5 (diff)
downloadkde-583a1bead82e2a20d396c425a2d74b7b8f9b93a9.tar.gz
kde-583a1bead82e2a20d396c425a2d74b7b8f9b93a9.tar.bz2
kde-583a1bead82e2a20d396c425a2d74b7b8f9b93a9.zip
cmake-utils.eclass: _ninjaopts_from_makeopts, fix plain '-j' and '-l'
Fix the _ninjaopts_from_makeopts to handle no-parameter '-j' and '-l' options correctly and convert them to appropriate parametrized ninja options.
-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 d035e0459f2..02b06bb3df8 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 )