ENH: Simpler AddExternalProject install step
This simplifies the implementation with add_external_project_step.
This commit is contained in:
parent
bf09570615
commit
88184bb698
@ -525,30 +525,17 @@ function(add_external_project_install_command name)
|
|||||||
sentinels_dir source_dir tmp_dir)
|
sentinels_dir source_dir tmp_dir)
|
||||||
get_configure_build_working_dir(${name} working_dir)
|
get_configure_build_working_dir(${name} working_dir)
|
||||||
|
|
||||||
get_target_property(cmd ${name} AEP_INSTALL_COMMAND)
|
get_property(cmd_set TARGET ${name} PROPERTY AEP_INSTALL_COMMAND SET)
|
||||||
if(cmd STREQUAL "")
|
if(cmd_set)
|
||||||
# Explicit empty string means no install step for this project
|
get_property(cmd TARGET ${name} PROPERTY AEP_INSTALL_COMMAND)
|
||||||
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
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
_aep_get_build_command(${name} INSTALL cmd)
|
_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()
|
endif()
|
||||||
|
add_external_project_step(${name} install
|
||||||
|
COMMAND ${cmd}
|
||||||
|
WORKING_DIRECTORY ${working_dir}
|
||||||
|
DEPENDEES build
|
||||||
|
)
|
||||||
endfunction(add_external_project_install_command)
|
endfunction(add_external_project_install_command)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user