More export templates
This MR brings more template exports.
This is part of story #1649.
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
OTBImageIO have been enhanced.
extern template have been added, in modules:
- OTBImageExport (new module for ITK templates using
Move implementations into cxx
The implementation of some classes has been moved to a dedicated
.cxx, for instance :
The export of
itkDynamicCastInDebugMode functions is done in module
TODO : show some figure regarding improvements on build time and binaries size.
TODO : add comments proposed by @poughov
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