Skip to content

Allow to set the cmake build flags #141

Description

@Hugal31

For now, Colcon automatically pass -j{os.cpu_count()} -l{os.cpu_count} to the cmake --build command, unless the MAKEFLAGS environment variable contains them. There is no other way to control what arguments the builder receives. This works fine with make, but is useless with Ninja, which doesn't use an environment variable.

As a workaround, I use taskset to change the CPU affinity and limit the number of parallel build, but it only limit the number of parallelism and thus doesn't work with tools such as distcc which allow to build with more parallelism.

It would be great to at least be able to control the parallelism via a colcon flag, or perhaps better, be able to directly pass arguments to the cmake --build invocation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions