colcon / colcon-cmake

Extension for colcon to support CMake packages
http://colcon.readthedocs.io
Apache License 2.0
16 stars 25 forks source link

CMake package registry breaks workspace isolation #91

Open Levi-Armstrong opened 3 years ago

Levi-Armstrong commented 3 years ago

We recently ran into issues with packages that leverage the CMake package registry feature. This feature breaks workspace isolation, should colcon automatically be passing the CMake disable flags?

  -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON
  -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON
dirk-thomas commented 3 years ago

I don't know enough about the CMake package registry to make a suggestion here. It sounds reasonable to me though.

Even with these flags embedded by default the user should be able to pass different values if desired.

Would you like to create a pull request for the proposed change?