Skip to content
Snippets Groups Projects
Commit fdce782b authored by Ben Boeckel's avatar Ben Boeckel
Browse files

ExternalProject: error out only if the property is unset

Property values may be empty; instead make sure they exist and allow for
empty values.
parent b99bbfe8
No related branches found
No related tags found
No related merge requests found
......@@ -1184,10 +1184,11 @@ endfunction()
function(ExternalProject_Get_Property name)
foreach(var ${ARGN})
string(TOUPPER "${var}" VAR)
get_property(${var} TARGET ${name} PROPERTY _EP_${VAR})
if(NOT ${var})
get_property(is_set TARGET ${name} PROPERTY _EP_${VAR} SET)
if(NOT is_set)
message(FATAL_ERROR "External project \"${name}\" has no ${var}")
endif()
get_property(${var} TARGET ${name} PROPERTY _EP_${VAR})
set(${var} "${${var}}" PARENT_SCOPE)
endforeach()
endfunction()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment