mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Fix dependencies inference for auto-disabled targets
Sometimes information about dependencies causing disabling were loosed and it was not possible to correctly display these dependencies in status report
This commit is contained in:
parent
c49b23d4dd
commit
3cb84ed17c
@ -551,7 +551,11 @@ foreach(m ${OPENCV_MODULES_DISABLED_AUTO})
|
||||
list(APPEND __mdeps ${d})
|
||||
endif()
|
||||
endforeach()
|
||||
list(APPEND OPENCV_MODULES_DISABLED_AUTO_ST "${m}(deps: ${__mdeps})")
|
||||
if(__mdeps)
|
||||
list(APPEND OPENCV_MODULES_DISABLED_AUTO_ST "${m}(deps: ${__mdeps})")
|
||||
else()
|
||||
list(APPEND OPENCV_MODULES_DISABLED_AUTO_ST "${m}")
|
||||
endif()
|
||||
endforeach()
|
||||
string(REPLACE "opencv_" "" OPENCV_MODULES_DISABLED_AUTO_ST "${OPENCV_MODULES_DISABLED_AUTO_ST}")
|
||||
|
||||
|
@ -174,6 +174,7 @@ endmacro()
|
||||
|
||||
# Internal macro; partly disables OpenCV module
|
||||
macro(__ocv_module_turn_off the_module)
|
||||
list(REMOVE_ITEM OPENCV_MODULES_DISABLED_AUTO "${the_module}")
|
||||
list(APPEND OPENCV_MODULES_DISABLED_AUTO "${the_module}")
|
||||
list(REMOVE_ITEM OPENCV_MODULES_BUILD "${the_module}")
|
||||
list(REMOVE_ITEM OPENCV_MODULES_PUBLIC "${the_module}")
|
||||
@ -193,7 +194,7 @@ macro(__ocv_flatten_module_required_dependencies the_module)
|
||||
break()
|
||||
elseif(";${OPENCV_MODULES_DISABLED_USER};${OPENCV_MODULES_DISABLED_AUTO};" MATCHES ";${__dep};")
|
||||
__ocv_module_turn_off(${the_module}) # depends on disabled module
|
||||
break()
|
||||
list(APPEND __flattened_deps "${__dep}")
|
||||
elseif(";${OPENCV_MODULES_BUILD};" MATCHES ";${__dep};")
|
||||
if(";${__resolved_deps};" MATCHES ";${__dep};")
|
||||
list(APPEND __flattened_deps "${__dep}") # all dependencies of this module are already resolved
|
||||
@ -262,6 +263,7 @@ macro(__ocv_flatten_module_dependencies)
|
||||
foreach(m ${OPENCV_MODULES_BUILD})
|
||||
set(HAVE_${m} ON CACHE INTERNAL "Module ${m} will be built in current configuration")
|
||||
__ocv_flatten_module_required_dependencies(${m})
|
||||
set(OPENCV_MODULE_${m}_DEPS ${OPENCV_MODULE_${m}_DEPS} CACHE INTERNAL "Flattened required dependencies of ${m} module")
|
||||
endforeach()
|
||||
|
||||
foreach(m ${OPENCV_MODULES_BUILD})
|
||||
@ -286,7 +288,7 @@ macro(__ocv_flatten_module_dependencies)
|
||||
ocv_list_unique(OPENCV_MODULES_BUILD_)
|
||||
|
||||
set(OPENCV_MODULES_PUBLIC ${OPENCV_MODULES_PUBLIC} CACHE INTERNAL "List of OpenCV modules marked for export")
|
||||
set(OPENCV_MODULES_BUILD ${OPENCV_MODULES_BUILD_} CACHE INTERNAL "List of OpenCV modules included into the build")
|
||||
set(OPENCV_MODULES_BUILD ${OPENCV_MODULES_BUILD_} CACHE INTERNAL "List of OpenCV modules included into the build")
|
||||
set(OPENCV_MODULES_DISABLED_AUTO ${OPENCV_MODULES_DISABLED_AUTO} CACHE INTERNAL "List of OpenCV modules implicitly disabled due to dependencies")
|
||||
endmacro()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user