Skip to content

Commit

Permalink
Merge pull request #34 from commontk/check-superbuild-var
Browse files Browse the repository at this point in the history
ExternalProject_Include_Dependencies: Check if superbuild variable is improperly set
  • Loading branch information
jcfr committed Aug 31, 2018
2 parents 4b4b5d2 + 3e69d92 commit 7ff0137
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ExternalProjectDependency.cmake
Expand Up @@ -758,6 +758,11 @@ macro(ExternalProject_Include_Dependencies project_name)
#message("[${project_name}] Setting _sb_SB_VAR with default value '${_sb_SB_VAR}'")
endif()

# Try to detect if superbuild variable was improperly passed
if("${_sb_SB_VAR}" STREQUAL "_SUPERBUILD")
message(FATAL_ERROR "SUPERBUILD_VAR value is incorrectly set to '_SUPERBUILD'")
endif()

# Set local variables
set(_sb_DEPENDS ${${_sb_DEPENDS_VAR}})
set(_sb_USE_SYSTEM ${${_sb_USE_SYSTEM_VAR}})
Expand Down

0 comments on commit 7ff0137

Please sign in to comment.