Updates will be applied - 3:30pm EDT (UTC -500). No downtime expected.

Commit fde3e6dc authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Fix bug introduced by 6e984332.

6e9843 changed the way optional dependencies are handled. As a consequence we
lost the arguments specified using 'add_extra_cmake_args' on an optional
dependency. This was causing ParaView builds with Python to fail on Windows.
Fixed that.

Change-Id: Ib10768c875ff94d09540869bd5bae34c04cd436a
parent 6e984332
......@@ -48,6 +48,7 @@ macro(add_external_project _name)
set(${cm-project}_DEPENDS "")
set(${cm-project}_ARGUMENTS "")
set(${cm-project}_NEEDED_BY "")
set(${cm-project}_DEPENDS_ANY "")
set(${cm-project}_DEPENDS_OPTIONAL "")
set(${cm-project}_CAN_USE_SYSTEM 0)
set (doing "")
......@@ -205,15 +206,31 @@ macro(project_check_name _name)
endmacro()
#------------------------------------------------------------------------------
# get dependencies for a project, including optional dependencies that are
# currently enabled. Since this macro looks at the ${mod}_ENABLED flag, it
# cannot be used in the 'processing' pass, but the 'build' pass alone.
macro(get_project_depends _name _prefix)
if (NOT build-projects)
message(AUTHOR_WARNING "get_project_depends can only be used in build pass")
endif()
if (NOT ${_prefix}_${_name}_done)
set(${_prefix}_${_name}_done 1)
# process regular dependencies
foreach (dep ${${_name}_DEPENDS})
if (NOT ${_prefix}_${dep}_done)
list(APPEND ${_prefix}_DEPENDS ${dep})
get_project_depends(${dep} ${_prefix})
endif()
endforeach()
# process optional dependencies (only consider those that are enabled).
foreach (dep ${${_name}_DEPENDS_OPTIONAL})
if (${dep}_ENABLED AND NOT ${_prefix}_${dep}_done)
list(APPEND ${_prefix}_DEPENDS ${dep})
get_project_depends(${dep} ${_prefix})
endif()
endforeach()
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