ExternalProject: Set FOLDER property to targets

This is useful when using the USE_FOLDERS global property
This commit is contained in:
Daniele E. Domenichelli 2014-04-29 11:41:12 +02:00
parent 39ef804602
commit 93730bb3e0
1 changed files with 3 additions and 0 deletions

View File

@ -1177,6 +1177,7 @@ function(ExternalProject_Add_StepTargets name)
add_custom_target(${name}-${step} add_custom_target(${name}-${step}
DEPENDS ${stamp_file}) DEPENDS ${stamp_file})
set_property(TARGET ${name}-${step} PROPERTY LABELS ${name}) set_property(TARGET ${name}-${step} PROPERTY LABELS ${name})
set_property(TARGET ${name}-${step} PROPERTY FOLDER "ExternalProjectTargets/${name}")
# Depend on other external projects (target-level). # Depend on other external projects (target-level).
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS) get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
@ -1920,6 +1921,8 @@ function(ExternalProject_Add name)
add_custom_target(${name} ALL DEPENDS ${complete_stamp_file}) add_custom_target(${name} ALL DEPENDS ${complete_stamp_file})
set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1) set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1)
set_property(TARGET ${name} PROPERTY LABELS ${name}) set_property(TARGET ${name} PROPERTY LABELS ${name})
set_property(TARGET ${name} PROPERTY FOLDER "ExternalProjectTargets/${name}")
_ep_parse_arguments(ExternalProject_Add ${name} _EP_ "${ARGN}") _ep_parse_arguments(ExternalProject_Add ${name} _EP_ "${ARGN}")
_ep_set_directories(${name}) _ep_set_directories(${name})
_ep_get_step_stampfile(${name} "done" done_stamp_file) _ep_get_step_stampfile(${name} "done" done_stamp_file)