Commit 6e90151d authored by Guillaume Pasero's avatar Guillaume Pasero

COMP: only sort enabled dependencies

parent 4ac1a0e6
......@@ -170,10 +170,14 @@ foreach(otb-module ${OTB_MODULES_ALL})
# We will sort modules according to their dependency graph,
# to enable them in order. To solve the modules dependency graph,
# we join both DEPENDS and OPTIONAL_DEPENDS
# we join both DEPENDS and OPTIONAL_DEPENDS (if enabled)
set(OTB_MODULE_${otb-module}_DEPENDS_FOR_SORT "")
list(APPEND OTB_MODULE_${otb-module}_DEPENDS_FOR_SORT ${OTB_MODULE_${otb-module}_DEPENDS})
list(APPEND OTB_MODULE_${otb-module}_DEPENDS_FOR_SORT ${OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS})
foreach(opt-dep ${OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS})
if(${opt-dep}_ENABLED)
list(APPEND OTB_MODULE_${otb-module}_DEPENDS_FOR_SORT ${opt-dep})
endif()
endforeach()
else()
list(APPEND OTB_MODULES_DISABLED ${otb-module})
endif()
......
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