From: Peter Marko Date: Thu, 6 Feb 2025 17:29:36 +0000 (+0100) Subject: cmake: apply parallel build settings to ptest tasks X-Git-Tag: yocto-5.2~539 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c311fbf0c2090268e9b83123d762b05b61b4074;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cmake: apply parallel build settings to ptest tasks ptest compile and install tasks do not have parallel build settings for cmake. On powerful build machines this can cause overload situations and oomkills. Observed when building qtgrpc with ptest generally enabled in distro. Having this in ptest class is suboptimal, but creating ptest-cmake class just for these two variables is probably overkill. Signed-off-by: Peter Marko Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/cmake.bbclass b/meta/classes-recipe/cmake.bbclass index e1c3d7ddb50..e79f8a74356 100644 --- a/meta/classes-recipe/cmake.bbclass +++ b/meta/classes-recipe/cmake.bbclass @@ -67,6 +67,8 @@ EXTRA_OECMAKE:append = " ${PACKAGECONFIG_CONFARGS}" export CMAKE_BUILD_PARALLEL_LEVEL CMAKE_BUILD_PARALLEL_LEVEL:task-compile = "${@oe.utils.parallel_make(d, False)}" CMAKE_BUILD_PARALLEL_LEVEL:task-install = "${@oe.utils.parallel_make(d, True)}" +CMAKE_BUILD_PARALLEL_LEVEL:task-compile-ptest-base = "${@oe.utils.parallel_make(d, False)}" +CMAKE_BUILD_PARALLEL_LEVEL:task-install-ptest-base = "${@oe.utils.parallel_make(d, True)}" OECMAKE_TARGET_COMPILE ?= "all" OECMAKE_TARGET_INSTALL ?= "install"