Skip to content

Make gz-cmake support colcon's symlink-install #288

@mjcarroll

Description

@mjcarroll

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions