Skip to content

Resolve "(core): forbid link between bundles"

Flavien BRIDAULT requested to merge 126-core-forbid-link-between-bundles into dev

Description

As promised, it is now forbidden to link with modules. A check is done at the end of the build to verify that a library or a module is not linked with a module. If this is the case, the configure step fails and a message is displayed.

The test was added at the end of the function sight_generate_component_list, which ensures this will be checked as well on child repositories.

Last, note that the previous warning was broken since the rewrite of the build system in Sight 21. Not a huge deal, but do not try to get the warning before this MR...

Closes #126 (closed)

How to test it?

  • Add one or several modules in the target_link_libraries command of a library or a module.
  • Observe you get an error like:
[cmake] CMake Error at cmake/build/macros.cmake:1150 (message):
[cmake]   module_ui_qt can not link with module(s): module_io_vtk module_ui_base
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:185 (sight_generate_component_list)
Edited by Flavien BRIDAULT

Merge request reports