Commit 09ddcebc authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Fix vtk_module_dep_includes to scan dependencies correctly.

Although vtk_module_dep_includes() is expected to recursively scan the
dependencies to build the include dirs list, it didn't work as expected with the
macro was called repeatedly within the same scope for different modules.  The
problem was that the code that managed the recursion traversal
(_vtk_module_config_recurse) uses variables to avoid duplicate traversal and
that was resulting identifying incorrect duplicate visits when
vtk_module_dep_includes() was used more than once. Fixed that by ensuring that
vtk_module_dep_includes() scope the variable namespace using the modules name.

Change-Id: I23fb97a9dafaf43b7ebdf0f837ee130b3ded9165
parent 921e6557
......@@ -45,9 +45,9 @@ endmacro()
# Loads the <module>_DEPENDS_INCLUDE_DIRS variable.
macro(vtk_module_dep_includes mod)
vtk_module_load("${mod}")
vtk_module_config(_dep ${${mod}_DEPENDS})
if(_dep_INCLUDE_DIRS)
set(${mod}_DEPENDS_INCLUDE_DIRS ${_dep_INCLUDE_DIRS})
vtk_module_config(_dep_${mod} ${${mod}_DEPENDS})
if(_dep_${mod}_INCLUDE_DIRS)
set(${mod}_DEPENDS_INCLUDE_DIRS ${_dep_${mod}_INCLUDE_DIRS})
endif()
endmacro()
......
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