diff options
author | Brad King <brad.king@kitware.com> | 2009-03-30 15:38:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-03-30 15:38:43 (GMT) |
commit | 88184bb698f767634abdfe09a4eb5b3e58536293 (patch) | |
tree | c9a66c58f42fa6a48248adaa4938afbe005e7f40 /Modules | |
parent | bf09570615d159f81cc68a3ea50b4dcc9263398f (diff) | |
download | CMake-88184bb698f767634abdfe09a4eb5b3e58536293.zip CMake-88184bb698f767634abdfe09a4eb5b3e58536293.tar.gz CMake-88184bb698f767634abdfe09a4eb5b3e58536293.tar.bz2 |
ENH: Simpler AddExternalProject install step
This simplifies the implementation with add_external_project_step.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/AddExternalProject.cmake | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/Modules/AddExternalProject.cmake b/Modules/AddExternalProject.cmake index 9702b66..c96a771 100644 --- a/Modules/AddExternalProject.cmake +++ b/Modules/AddExternalProject.cmake @@ -525,30 +525,17 @@ function(add_external_project_install_command name) sentinels_dir source_dir tmp_dir) get_configure_build_working_dir(${name} working_dir) - get_target_property(cmd ${name} AEP_INSTALL_COMMAND) - if(cmd STREQUAL "") - # Explicit empty string means no install step for this project - add_custom_command( - OUTPUT ${sentinels_dir}/${name}-install - COMMAND ${CMAKE_COMMAND} -E touch ${sentinels_dir}/${name}-install - WORKING_DIRECTORY ${working_dir} - COMMENT "No install step for '${name}'" - DEPENDS ${sentinels_dir}/${name}-build - VERBATIM - ) + get_property(cmd_set TARGET ${name} PROPERTY AEP_INSTALL_COMMAND SET) + if(cmd_set) + get_property(cmd TARGET ${name} PROPERTY AEP_INSTALL_COMMAND) else() _aep_get_build_command(${name} INSTALL cmd) - - add_custom_command( - OUTPUT ${sentinels_dir}/${name}-install - COMMAND ${cmd} - COMMAND ${CMAKE_COMMAND} -E touch ${sentinels_dir}/${name}-install - WORKING_DIRECTORY ${working_dir} - COMMENT "Performing install step for '${name}'" - DEPENDS ${sentinels_dir}/${name}-build - VERBATIM - ) endif() + add_external_project_step(${name} install + COMMAND ${cmd} + WORKING_DIRECTORY ${working_dir} + DEPENDEES build + ) endfunction(add_external_project_install_command) |