Commit a3a74709 authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: handle deprecated modules and option OTB_USE_DEPRECATED

parent 50254d3c
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment