summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-02-28 19:38:38 +0100
committerMichael Palimaka <kensington@gentoo.org>2016-05-26 18:12:49 +1000
commit3b17d658fe15cf1cee822168fb15522e47c487c5 (patch)
treeaeb9d4abbf8a8cb4309632744dd1b4365021858f
parent406a75f6b4d9a3f54bc39e9931881f87dce3e47f (diff)
downloadkde-3b17d658fe15cf1cee822168fb15522e47c487c5.tar.gz
kde-3b17d658fe15cf1cee822168fb15522e47c487c5.tar.bz2
kde-3b17d658fe15cf1cee822168fb15522e47c487c5.zip
cmake-utils.eclass: _ninjaopts_from_makeopts, fix handling of -k
Fix _ninjaopts_from_makeopts to handle -k correctly. Make does not support parameters to -k, while ninja requires one. Therefore, handle only a single '-k' and convert it into '-k 0' (no limit of failing tasks).
-rw-r--r--eclass/cmake-utils.eclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 5958230e468..d035e0459f2 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -659,14 +659,19 @@ _ninjaopts_from_makeopts() {
set -- ${MAKEOPTS}
while (( $# )); do
case $1 in
- -j|-l|-k)
+ -j|-l)
ninjaopts+=( $1 $2 )
shift 2
;;
- -j*|-l*|-k*)
+ -j*|-l*)
ninjaopts+=( $1 )
shift 1
;;
+ -k)
+ # -k 0 = any number of tasks can fail
+ ninjaopts+=( $1 0 )
+ shift 1
+ ;;
*) shift ;;
esac
done