So you want to deprecate something in OTB? Follow the guide:
A C++ class
In the doxygen documentation of the class, add the \deprecated
keyword.
A method of a C++ class or free function
In the doxygen documentation of the method, add the \deprecated
keyword.
A part of the Python API
An OTB application
Add the deprecated tag to DoInit()
section:
AddDocTag(Tags::Deprecated);
An OTB module
An OTB module can be deprecated thanks to the otb_module
macro in the otb-module.cmake
. One just need to add the key word DEPRECATED
the arguments.
Here is an example of th otb-module.cmake
of a deprecated module :
set(DOCUMENTATION "Some documentation")
otb_module(OTBDeprecatedModuleName
DEPENDS
OTBSomeDependencies
TEST_DEPENDS
OTBTestKernel
OTBSomeOtherDependenciesForTest
DEPRECATED
DESCRIPTION
"${DOCUMENTATION}"
)
One need to make sure that the deprecated module is not a mandatory dependency of any other module. One can still allow the module to be used thanks to the OPTIONAL_DEPENDS
key word :
set(DOCUMENTATION "Some documentation")
otb_module(OTBDModuleName
DEPENDS
OTBSomeDependencies
OPTIONAL_DEPENDS
OTBSomeOptionalDependencies
OTBSomeDeprecatedModule
TEST_DEPENDS
OTBTestKernel
OTBSomeOtherDependenciesForTest
DESCRIPTION
"${DOCUMENTATION}"
)
Please make sure that all of the classes, methods and free functions in the module have the ModuleName_DEPRECATED_EXPORT
and the Doxygene tag \deprecated
.