summaryrefslogtreecommitdiff
path: root/buildstream/plugins
diff options
context:
space:
mode:
authorAbderrahim Kitouni <a.kitouni@gmail.com>2018-04-12 10:07:01 +0100
committerAbderrahim Kitouni <a.kitouni@gmail.com>2018-04-14 14:53:36 +0100
commitd41940f516498f827967b8e5d311ce6accb88f56 (patch)
tree43acf4a921fe07fd68a2f13c7c302d62b891a56b /buildstream/plugins
parentd603051e4ac14ccb7413861963eccffd21fcdf34 (diff)
downloadbuildstream-d41940f516498f827967b8e5d311ce6accb88f56.tar.gz
plugins/elements/cmake.yaml: allow using ninja instead of make (#279)abderrahim/cmake-ninja
This uses the build tool mode of cmake to have a single command that can call either make or ninja. I've also modified the tests to take the new commands into account
Diffstat (limited to 'buildstream/plugins')
-rw-r--r--buildstream/plugins/elements/cmake.yaml15
1 files changed, 9 insertions, 6 deletions
diff --git a/buildstream/plugins/elements/cmake.yaml b/buildstream/plugins/elements/cmake.yaml
index 234aa1770..b51727b04 100644
--- a/buildstream/plugins/elements/cmake.yaml
+++ b/buildstream/plugins/elements/cmake.yaml
@@ -13,6 +13,9 @@ variables:
# For backwards compatibility only, do not use.
cmake-extra: ''
+ # The cmake generator to use
+ generator: Unix Makefiles
+
cmake-args: |
-DCMAKE_INSTALL_PREFIX:PATH="%{prefix}" \
@@ -20,10 +23,10 @@ variables:
cmake: |
- cmake -B%{build-dir} -H. %{cmake-args}
+ cmake -B%{build-dir} -H. -G"%{generator}" %{cmake-args}
- make: make -C %{build-dir}
- make-install: make -j1 -C %{build-dir} DESTDIR="%{install-root}" install
+ make: cmake --build %{build-dir} -- ${JOBS}
+ make-install: env DESTDIR="%{install-root}" cmake --build %{build-dir} --target install
# Set this if the sources cannot handle parallelization.
#
@@ -59,11 +62,11 @@ config:
# Use max-jobs CPUs for building and enable verbosity
environment:
- MAKEFLAGS: -j%{max-jobs}
+ JOBS: -j%{max-jobs}
V: 1
-# And dont consider MAKEFLAGS or V as something which may
+# And dont consider JOBS or V as something which may
# effect build output.
environment-nocache:
-- MAKEFLAGS
+- JOBS
- V