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

Make gz-cmake support colcon's symlink-install

Open mjcarroll opened this issue 2 years ago • 0 comments

Desired behavior

Make packages built by developers with colcon respect the symlink-install argument from the command line.

This is very convenient for developers who are rapidly iterating on files that shouldn't require a "make install" every time.

Implementation suggestion

colcon_ros accomplishes this by setting an additional flag AMENT_CMAKE_SYMLINK_INSTALL=1 to be passed to the cmake invocation: https://github.com/colcon/colcon-ros/blob/d7a66047e5aac95ee31eee2ef837f76919e2be9e/colcon_ros/task/ament_cmake/build.py#L50-L53

Given this flag, ament_cmake then overrides the default cmake install() behavior such that symlinks are used, rather than actually copying the files: https://github.com/ament/ament_cmake/tree/966930aca4f8a0b57245a8da9e7be45861de17fc/ament_cmake_core/cmake/symlink_install

mjcarroll avatar Jul 29 '22 01:07 mjcarroll