Page MenuHomePhabricator

MITK_CREATE_MACRO should prohibit dependencies against autoload modules
Closed, ResolvedPublic

Description

Status: Currently you can depend a module on autoload modules. This is not correct and leads to problems like seen in T26976.
There should never be a need to directly depend on autoload modules as the provide implementation (e.g. io serivices), but the public interfaces one should depend on are provided by normal modules.

Proposed solution:

  • Every autoload module target has the target property "MITK_AUTOLOAD_DIRECTORY".
  • Thus check in the MITK_CREATE_MACRO if one of the modules specified by "DEPENDS" is an autoload module (has the target property "MITK_AUTOLOAD_DIRECTORY")
  • If this is the case an informative CMake error should be thrown.

Revisions and Commits

Event Timeline

floca triaged this task as Normal priority.Jan 9 2020, 10:20 AM
floca created this task.
floca added a revision: Restricted Differential Revision.Jan 10 2020, 12:09 PM
floca added a project: Noteworthy.
floca added a subscriber: kislinsk.

@kislinsk You mentioned that we should do something as soon as the (wrong) autload dependencies are gone. I cannot remember what, do you? May be some work arround in our packaging code due to the autoload modules?

@kislinsk You mentioned that we should do something as soon as the (wrong) autload dependencies are gone. I cannot remember what, do you? May be some work arround in our packaging code due to the autoload modules?

Yes, I think in the FixMacOS script is a loop that copies all autoload modules right into the bin folder. This shouldn't be necessary anymore and after removing it, it is a good indicator if the packaged macOS MITK Workbench starts without errors.