Skip to content
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

Allow to set the cmake build flags #141

Open
Hugal31 opened this issue Jul 11, 2024 · 0 comments · May be fixed by #142
Open

Allow to set the cmake build flags #141

Hugal31 opened this issue Jul 11, 2024 · 0 comments · May be fixed by #142

Comments

@Hugal31
Copy link

Hugal31 commented Jul 11, 2024

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.

@Hugal31 Hugal31 linked a pull request Jul 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant