Skip to content

Commit

Permalink
Set "use system" variable if it has NOT already been explicitly set
Browse files Browse the repository at this point in the history
By default, assuming all dependent projects of a project A are expected
to be available on the system if A is expected to be on the system. This
commit allow to overwrite this.
  • Loading branch information
jcfr committed Mar 2, 2015
1 parent 6725b6a commit 82fa9f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ExternalProjectDependency.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ macro(ExternalProject_Include_Dependencies project_name)
set(_sb_REQUIRED_DEPENDS)
foreach(dep ${_sb_DEPENDS})
if(NOT ${_sb_proj} STREQUAL ${SUPERBUILD_TOPLEVEL_PROJECT})
if(_sb_USE_SYSTEM)
# Set "use system" variable if it has NOT already been explicitly set
get_property(_sb_${dep}_USE_SYSTEM_VAR GLOBAL PROPERTY SB_${dep}_USE_SYSTEM_VAR)
if(_sb_USE_SYSTEM AND NOT DEFINED ${_sb_${dep}_USE_SYSTEM_VAR})
set_property(GLOBAL PROPERTY SB_${dep}_USE_SYSTEM ${_sb_USE_SYSTEM})
#message(${_sb_proj} "Property SB_${dep}_USE_SYSTEM set to [${_sb_USE_SYSTEM_VAR}:${_sb_USE_SYSTEM}]")
endif()
Expand Down

0 comments on commit 82fa9f4

Please sign in to comment.