Page MenuHomePhabricator

Config/Build fails with external projects using an custom Find<proj>.cmake and an externaly set <proj>_DIR
Closed, ResolvedPublic

Assigned To
Authored By
Jun 11 2018, 2:38 PM
Referenced Files
"Evil Spooky Haunted Tree" token, awarded by kislinsk.


External projects (EP) with the following conditions currently fail to build in our super build:

  1. EP uses a custom Find<EP>.cmake to deduce the project informations and does not support the config mode.
  2. EP is configured with an external <EP>_DIR. Thus nothind is copied or build into mitk/ep directories.


MITK cmake has a two step strategy to find/include packages of external projects.

  1. It uses find_package in config mode (searching for config file information)
  2. If 1 failes, it retries find_package with find-file-mode.

The first step overwrites any content in a <EP>_DIR variable, even if the step failes. This leads to missing information in the 2nd step/try, even if the information was passed through by the mitk superbuild.

Till now the problem was not detected because we only have EPs that either support config files (1st step) or assume to be build and ar build in the EP directory. You can reproduce it e.g. with th EP "eigen", if not using the superbuild "eigen", but providing an external/system "eigen".

Revisions and Commits