Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 928346

Summary: cmake.eclass: export CMAKE_BUILD_PARALLEL_LEVEL
Product: Gentoo Linux Reporter: Alexey <alexey+gentoo>
Component: EclassesAssignee: Gentoo KDE team <kde>
Status: CONFIRMED ---    
Severity: normal CC: base-system, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 654178    

Description Alexey 2024-04-01 07:10:30 UTC
If a cmake project builds parts of itself using ExternalProject_Add(), MAKEOPTS is not propagated to the inner ninja.

https://github.com/gentoo/gentoo/pull/36016 is an example of workaround for this, except that it should be set in the eclass, and it still doesn't propagate -l

Docs: https://cmake.org/cmake/help/latest/envvar/CMAKE_BUILD_PARALLEL_LEVEL.html
Comment 1 Larry the Git Cow gentoo-dev 2024-04-01 07:14:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34734a17a456ded2122211876e2ff3612ee259d1

commit 34734a17a456ded2122211876e2ff3612ee259d1
Author:     Alexey Sokolov <alexey+gentoo@asokolov.org>
AuthorDate: 2024-03-31 15:47:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-01 07:13:55 +0000

    dev-util/bear: limit parallelism
    
    I can't find a way to pass -l through cmake --build of ExternalProject,
    but at least it passes -j now
    
    [sam: added Bug: tag.]
    
    Bug: https://bugs.gentoo.org/928346
    Closes: https://bugs.gentoo.org/922199
    Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
    Closes: https://github.com/gentoo/gentoo/pull/36016
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/bear/bear-3.1.3.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-01 07:14:35 UTC
I agree we should do this. While it's often an example of a bundled library, it's not always avoidable, and it's better than bombing out the system.