Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928346 - cmake.eclass: export CMAKE_BUILD_PARALLEL_LEVEL
Summary: cmake.eclass: export CMAKE_BUILD_PARALLEL_LEVEL
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: makeopts-ignored
  Show dependency tree
 
Reported: 2024-04-01 07:10 UTC by Alexey
Modified: 2024-04-01 07:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.