From 88184bb698f767634abdfe09a4eb5b3e58536293 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 30 Mar 2009 11:38:43 -0400 Subject: ENH: Simpler AddExternalProject install step This simplifies the implementation with add_external_project_step. --- Modules/AddExternalProject.cmake | 29 ++++++++--------------------- 1 file 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) -- cgit v0.12