colcon-cmake icon indicating copy to clipboard operation
colcon-cmake copied to clipboard

About changing the default compilation method of colcon build

Open p-zzg opened this issue 1 year ago • 2 comments

Now colcon build compilation should be used cmake --build . --target install

I want to implement cmake --build . --target package Generate the content I need to install as deb

All install content is generated in deb

How can I modify core to do this

Requirement: Multiple function packages in a workspace are compiled to generate a deb file

p-zzg avatar May 09 '24 09:05 p-zzg

colcon Whether the related configuration can be implemented What about the "cmake --build. --target package" function?

p-zzg avatar May 09 '24 09:05 p-zzg

You might be able to do this with the --cmake-target option in colcon-cmake: https://github.com/colcon/colcon-cmake/blob/1509c77ecb417dd0b47e4d54b73833fa5e4c1baa/colcon_cmake/task/cmake/build.py#L44-L46

I'm transferring this issue to that package.

If --cmake-target isn't sufficient, it's likely that colcon can't do what you want out of the box, and you may need to implement a new colcon extension.

cottsay avatar Jun 07 '24 19:06 cottsay