ExternalProject: error out only if the property is unset
Property values may be empty; instead make sure they exist and allow for empty values.
This commit is contained in:
parent
b99bbfe88d
commit
fdce782b61
|
@ -1184,10 +1184,11 @@ endfunction()
|
||||||
function(ExternalProject_Get_Property name)
|
function(ExternalProject_Get_Property name)
|
||||||
foreach(var ${ARGN})
|
foreach(var ${ARGN})
|
||||||
string(TOUPPER "${var}" VAR)
|
string(TOUPPER "${var}" VAR)
|
||||||
get_property(${var} TARGET ${name} PROPERTY _EP_${VAR})
|
get_property(is_set TARGET ${name} PROPERTY _EP_${VAR} SET)
|
||||||
if(NOT ${var})
|
if(NOT is_set)
|
||||||
message(FATAL_ERROR "External project \"${name}\" has no ${var}")
|
message(FATAL_ERROR "External project \"${name}\" has no ${var}")
|
||||||
endif()
|
endif()
|
||||||
|
get_property(${var} TARGET ${name} PROPERTY _EP_${VAR})
|
||||||
set(${var} "${${var}}" PARENT_SCOPE)
|
set(${var} "${${var}}" PARENT_SCOPE)
|
||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
Loading…
Reference in New Issue