Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CamiTK Community Edition CamiTK Community Edition
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • CamiTK
  • CamiTK Community EditionCamiTK Community Edition
  • Issues
  • #119

Closed
Open
Created Jan 13, 2021 by Emmanuel Promayon@promayoeOwner

CMake error when trying to install a CEP dependent on another CEP

About you

CamiTK developer/maintainer

Overview

In CamiTK community edition, the cep-generator test allows us to check that everything works when compiling a CEP that depends on CamiTK SDK There is no test that check the third-level dependency, i.e., when trying to compile and install a CEP that depends on another CEP that depends on CamiTK SDK. With recent version of CMake, warnings about missing autogen target became errors. Now it is not possible to install a CEP that depends on another already installed CEP without a CMake error (although it is possible to build it...).

Steps to Reproduce

This is quite long to reproduce:

  1. build and install the latest develop version of CamiTK CE
  2. create a CEP called level2cep that has dependencies to CamiTK SDK, e.g. that have a component that depends on medicalimageviewer or vtkmesh. This CEP should create a new component, lets call it level2comp
  3. build an install level2cep
  4. create a CEP called level3cep that has dependencies to level2Cp, e.g. that have a component that depends on level2comp
  5. build level3cep At configure time you should see an error:
CMake Error in components/level2comp/CMakeLists.txt:
  The dependency target "component-level2comp" of target
  "component-level2comp_autogen" does not exist.

BUT the build will finish and everything will work 6. try to install level3cep, you you will get the same error but the install will fail.

Actual VS Expected Result

There should be no error and the the install should work.

Interpretation & Possible fixes

CMake camitk_extension macro should take into account the fact that if a target is not found, it should be declared as imported.

Possible fix: add a test in camitk_extension to check if a target exist or not using if (NOT TARGET ...)

Caveat: using if (NOT TARGET ...) will not be able to distinguish between external targets and local targets that are not yet declared in the configuration process.

CamiTK Version

CamiTK 4.2.dev.develop.ae2812e8


please do not remove anything below this line

Assignee
Assign to
Time tracking