Commit 8f854e9a authored by Guillaume Pasero's avatar Guillaume Pasero Committed by Antoine Regimbeau

COMP: allow tests to link with optional deps, no dragged by module lib

parent 3493d8bb
......@@ -277,6 +277,12 @@ macro(otb_module_test)
foreach(dep IN LISTS OTB_MODULE_${otb-module-test}_DEPENDS)
list(APPEND ${otb-module-test}_LIBRARIES "${${dep}_LIBRARIES}")
endforeach()
# make sure the test can link with optional libs
foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
if (${dep}_ENABLED)
list(APPEND ${otb-module-test}_LIBRARIES "${${dep}_LIBRARIES}")
endif()
endforeach()
endmacro()
macro(otb_module_warnings_disable)
......
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