diff options
author | Brad King <brad.king@kitware.com> | 2015-04-21 15:32:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-22 12:48:52 (GMT) |
commit | e1c6df392bae4f807bbc56f2c4320de412f48721 (patch) | |
tree | 6ef9578dcdbdd01d6ee5059374c56a590a326392 /Modules/ExternalProject.cmake | |
parent | c0502faa4b6c0a3c33d1b0dd346801ff8d4f8b0d (diff) | |
download | CMake-e1c6df392bae4f807bbc56f2c4320de412f48721.zip CMake-e1c6df392bae4f807bbc56f2c4320de412f48721.tar.gz CMake-e1c6df392bae4f807bbc56f2c4320de412f48721.tar.bz2 |
ExternalProject: Allow dependencies on INTERFACE libraries
Respect INTERFACE library property whitelist. Check that a target has
type "UTILITY" before querying other properties.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index db3086c..97bebc0 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1539,6 +1539,11 @@ function(ExternalProject_Add_StepDependencies name step) message(FATAL_ERROR "Cannot find target \"${name}\". Perhaps it has not yet been created using ExternalProject_Add.") endif() + get_property(type TARGET ${name} PROPERTY TYPE) + if(NOT type STREQUAL "UTILITY") + message(FATAL_ERROR "Target \"${name}\" was not generated by ExternalProject_Add.") + endif() + get_property(is_ep TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT) if(NOT is_ep) message(FATAL_ERROR "Target \"${name}\" was not generated by ExternalProject_Add.") @@ -1551,6 +1556,10 @@ function(ExternalProject_Add_StepDependencies name step) endif() if(TARGET ${name}-${step}) + get_property(type TARGET ${name}-${step} PROPERTY TYPE) + if(NOT type STREQUAL "UTILITY") + message(FATAL_ERROR "Target \"${name}-${step}\" was not generated by ExternalProject_Add_StepTargets.") + endif() get_property(is_ep_step TARGET ${name}-${step} PROPERTY _EP_IS_EXTERNAL_PROJECT_STEP) if(NOT is_ep_step) message(FATAL_ERROR "Target \"${name}-${step}\" was not generated by ExternalProject_Add_StepTargets.") @@ -2034,10 +2043,13 @@ function(_ep_add_configure_command name) set(file_deps) get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS) foreach(dep IN LISTS deps) - get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT) - if(is_ep) - _ep_get_step_stampfile(${dep} "done" done_stamp_file) - list(APPEND file_deps ${done_stamp_file}) + get_property(dep_type TARGET ${dep} PROPERTY TYPE) + if(dep_type STREQUAL "UTILITY") + get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT) + if(is_ep) + _ep_get_step_stampfile(${dep} "done" done_stamp_file) + list(APPEND file_deps ${done_stamp_file}) + endif() endif() endforeach() |