From d74e19ce269c67f10e5369cc7c8b9c0d3c55f48e Mon Sep 17 00:00:00 2001 From: Aleix Pol Gonzalez Date: Thu, 9 Oct 2025 14:57:33 +0200 Subject: [PATCH 1/2] cmake: Do not call both --build and --install when installing cmake --install does what we want Fixes #92 --- src/buildstream_plugins/elements/cmake.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildstream_plugins/elements/cmake.yaml b/src/buildstream_plugins/elements/cmake.yaml index aaf5c33..ad4040f 100644 --- a/src/buildstream_plugins/elements/cmake.yaml +++ b/src/buildstream_plugins/elements/cmake.yaml @@ -36,7 +36,7 @@ variables: cmake -B%{build-dir} -H"%{conf-root}" -G"%{generator}" %{cmake-args} make: cmake --build %{build-dir} -- ${JOBS} - make-install: env DESTDIR="%{install-root}" cmake --build %{build-dir} --target install + make-install: env DESTDIR="%{install-root}" cmake %{build-dir} --install # Set this if the sources cannot handle parallelization. # From f0414b9b39d75b71c93adc490cd4f2fdce4bae12 Mon Sep 17 00:00:00 2001 From: Aleix Pol Gonzalez Date: Thu, 9 Oct 2025 15:01:01 +0200 Subject: [PATCH 2/2] cmake: Specify the parallelisation using cmake Rather than using the native arguments, which then is dependant on the generator that is in use. --- src/buildstream_plugins/elements/cmake.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/buildstream_plugins/elements/cmake.yaml b/src/buildstream_plugins/elements/cmake.yaml index ad4040f..dad463d 100644 --- a/src/buildstream_plugins/elements/cmake.yaml +++ b/src/buildstream_plugins/elements/cmake.yaml @@ -35,7 +35,7 @@ variables: cmake -B%{build-dir} -H"%{conf-root}" -G"%{generator}" %{cmake-args} - make: cmake --build %{build-dir} -- ${JOBS} + make: cmake --build %{build-dir} make-install: env DESTDIR="%{install-root}" cmake %{build-dir} --install # Set this if the sources cannot handle parallelization. @@ -72,9 +72,9 @@ config: # Use max-jobs CPUs for building and enable verbosity environment: - JOBS: -j%{max-jobs} + CMAKE_BUILD_PARALLEL_LEVEL: %{max-jobs} -# And dont consider JOBS as something which may +# And dont consider CMAKE_BUILD_PARALLEL_LEVEL as something which may # affect build output. environment-nocache: -- JOBS +- CMAKE_BUILD_PARALLEL_LEVEL