Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CamiTK Community Edition CamiTK Community Edition
  • Project information
    • Project information
    • Activity
    • Labels
    • 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
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • CamiTKCamiTK
  • CamiTK Community EditionCamiTK Community Edition
  • Issues
  • #98
Closed
Open
Issue created May 29, 2020 by Emmanuel Promayon@promayoeOwner

CMake code generation over viewer's extension targets

About you

CamiTK dev

Overview

If a component or action declares a dependency to a viewer extension, CMake generates an error during generation.

CMake Error in actions/testactions/CMakeLists.txt:
   The dependency target "viewer-medicalimageviewer" of target
   "action-testactions_autogen" does not exist.

→ The viewer's extension targets are not exported properly and generate an error

Steps to Reproduce

In an action CMakeLists.txt, add the following line inside the camitk_extension parameters:

camitk_extension(ACTION_EXTENSION
                 ...
                 NEEDS_VIEWER_EXTENSION medicalimageviewer 
                 ...
)

Actual VS Expected Result

When running the CMake generation on the project, the following error is generated

CMake Error in actions/testactions/CMakeLists.txt:
  The dependency target "viewer-medicalimageviewer" of target
  "action-testactions_autogen" does not exist.

The target is not known by the CEP as it is not exported by CamiTK CE. The expected result is a error free CMake generation

I created a specific branch and MR (see !147 (merged)) with cepgenerator test files. This can be considered as fixed when the test application-cepgenerator-bash-test in MR !147 (merged) returns no error.

To run the test :

  • checkout branch bug/target-export
  • configure and build
  • run the corresponding test:
ctest -VV -R application-cepgenerator-bash-test

Interpretation & Possible fixes

Two possible fixes:

  • either fix CamiTK CMake files so that extensions are exported
  • tweak the cepgenerator to add the following lines in the generated action CMakeLists.txt AND document the manual fix in the wiki.
# Add this line in the action or component CMakeLists.txt, before the call to the camitk_extension macro
add_library(viewer-medicalimageviewer INTERFACE IMPORTED)
  • FindCamiTK.cmake includes these export lines

Note that a similar line has to be added from each added NEEDS_VIEWER_EXTENSION dependencies

CamiTK Version

CamiTK version........................... CamiTK 4.2.dev.bug-target-export.0cf6a8fa

Track Debugging

Edited Sep 28, 2020 by Emmanuel Promayon
Assignee
Assign to
Time tracking