Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 206
    • Issues 206
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !393

More export templates

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Guillaume Pasero requested to merge 1649-extern-templates-take4 into develop Feb 19, 2019
  • Overview 13
  • Commits 45
  • Pipelines 6
  • Changes 142

Summary

This MR brings more template exports.

Rationale

This is part of story #1649.

Implementation Details

CMake mechanism to export all symbols

I had a problem with the export of ITK classes : they are not defined with a proper export macro as we try to do now with extern templates. By default, the compilation of shared libraries in OTB uses -fvisibility=hidden so that symbols are hidden by default (unless explicitely exported). In order to make ITK symbols visible in OTB shared libraries I had to compile them into a dedicated shared lib, and to disable the hidden setting. This is done when declaring the module, with the option EXPORT_ALL, for example, in OTBITK module:

otb_module(OTBITK
  ENABLE_SHARED
  EXPORT_ALL
  DEPENDS
    ...
New modules with extern templates

The exports in OTBImageBase and OTBImageIO have been enhanced.

More extern template have been added, in modules:

  • OTBCommon
  • OTBObjectList
  • OTBStreaming
  • OTBVectorDataBase
  • OTBTransform
  • OTBITK
  • OTBImageExport (new module for ITK templates using Image and VectorImage)
  • OTBImageManipulation
  • OTBStatistics
  • OTBVectorDataManipulation
  • OTBVectorDataIO
Move implementations into cxx

The implementation of some classes has been moved to a dedicated .cxx, for instance :

  • VectorDataFileWriterException
  • ImageKeywordlist
  • QtWidgetParameterBase

Additional notes

The export of itkDynamicCastInDebugMode functions is done in module OTBImageExport.

TODO : show some figure regarding improvements on build time and binaries size.

TODO : add comments proposed by @poughov

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Edited Feb 26, 2019 by Guillaume Pasero
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 1649-extern-templates-take4