-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controlling build parallelism level #28
base: release/v1.0.18
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change, I'm a bit confused by the placeholder, but otherwise looking good.
This will need to be rebased on release/v1.0.18 and target a release branch.
@@ -69,8 +69,7 @@ function(hfc_autotools_register_content_build content_name) | |||
endif() | |||
set (AUTOTOOLS_MAKE_PROGRAM "${MAKE_PROGRAM}") | |||
|
|||
ProcessorCount(NUM_JOBS) | |||
set (build_command "${MAKE_PROGRAM} -j ${NUM_JOBS}") | |||
set (build_command "${MAKE_PROGRAM} -j @NUM_JOB_PLACEHOLDER@") # the @@ placeholder will be replaced in the generated external project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is a placeholder that will expand to a bash variable 🤔 , why use a placeholder at all ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't want the bash variable code to be duplicated accross autotools and cmake build and yet still be able to evaluate the cmake logic at the right time in any of the combinatorials of build time and configure time dependencies.
- the value of the environment variable ``CMAKE_BUILD_PARALLEL_LEVEL`` | ||
- the value supplied to ``cmake --build`` via the ``-j <jobs>`` / ``--parallel <jobs>`` argument | ||
|
||
Generally not that dependencies that are made available at **build time** will have their own, separate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not -> note
- during the build | ||
- dependencies **made available at build time** will use 2 CPU cores | ||
- the top level build graph (your project) will use 10 CPU cores | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is very long for a simple option, I wonder if we really like to be that much detailed as we plan to change this in future versions.
4795d39
to
58811b2
Compare
3d792f7
to
81fcd0c
Compare
CHANGELOG - Improved the way that build parallelism settings are forwarded through the build graph so that the correct outcome is achieved depending on setting CMAKE_BUILD_PARALLEL_LEVEL via environment Change-Id: I33ae3760b2a0ab00048f07ac2a7c14d3bbc460b7
81fcd0c
to
6129a3e
Compare
CHANGELOG
Change-Id: I33ae3760b2a0ab00048f07ac2a7c14d3bbc460b7