Skip to content

Provide unified build system concurrency parameter and allow CLI definition to override value. #105

@davidlion

Description

@davidlion

Request

Currently, both CMake and b2 (boost) have concurrency parameters that can be set via task arguments. Generally these parameters default to the build system's default unless explicitly specified. This can be an issue when the environment cannot support the provided level of concurrency.

Ideally, a user should be able to override these concurrency parameters via a single CLI definition.

Possible implementation

A task that runs a build system (i.e. the lowest level task that actually calls cmake/b2 and sets their concurrency argument) checks a global variable and uses its value if defined/non-empty.

This global variable would be specifically meant for the CLI and should not be set by anything else (although there is no way to enforce this).

This solution avoids some pain points in alternatives:

  • The task setting the build system's parameter could have it default to the CLI variable, but then any caller that wishes to pass in its own concurrency value needs to also check the CLI variable.
  • Trying to directly re-use the same variable defined by the build system tasks (i.e. relying on the user to override/specify the variable used by the lowest level task) will also result in any caller needing to check for an existing value.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions