Skip to content
Snippets Groups Projects
Commit a3a74709 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: handle deprecated modules and option OTB_USE_DEPRECATED

parent 50254d3c
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,8 @@ foreach(otb-module ${OTB_MODULES_ALL})
if(OTB_MODULE_${otb-module}_ACTIVATION_OPTION
AND NOT ${OTB_MODULE_${otb-module}_ACTIVATION_OPTION})
otb_module_disable("${otb-module}" "${OTB_MODULE_${otb-module}_ACTIVATION_OPTION}")
elseif(OTB_MODULE_${otb-module}_IS_DEPRECATED AND NOT OTB_USE_DEPRECATED)
otb_module_disable("${otb-module}" "OTB_USE_DEPRECATED")
endif()
endforeach()
......
......@@ -69,6 +69,9 @@ macro(otb_module _name)
elseif("${arg}" MATCHES "^ENABLE_SHARED$")
set(_doing "")
set(OTB_MODULE_${otb-module}_ENABLE_SHARED 1)
elseif("${arg}" MATCHES "^DEPRECATED$")
set(_doing "")
set(OTB_MODULE_${otb-module}_IS_DEPRECATED 1)
elseif("${arg}" MATCHES "^[A-Z][A-Z][A-Z]$")
set(_doing "")
message(AUTHOR_WARNING "Unknown argument [${arg}]")
......@@ -221,6 +224,7 @@ macro(otb_module_impl)
generate_export_header(${otb-module}
EXPORT_FILE_NAME ${_export_header_file}
EXPORT_MACRO_NAME ${otb-module}_EXPORT
DEPRECATED_MACRO_NAME ${otb-module}_DEPRECATED
NO_EXPORT_MACRO_NAME ${otb-module}_HIDDEN
STATIC_DEFINE OTB_STATIC )
install(FILES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment