Commit bf095706 authored by Brad King's avatar Brad King
Browse files

ENH: Simpler AddExternalProject build step

This simplifies the implementation with add_external_project_step.
parent f3ba510a
......@@ -506,30 +506,17 @@ function(add_external_project_build_command name)
sentinels_dir source_dir tmp_dir)
get_configure_build_working_dir(${name} working_dir)
get_target_property(cmd ${name} AEP_BUILD_COMMAND)
if(cmd STREQUAL "")
# Explicit empty string means no build step for this project
add_custom_command(
OUTPUT ${sentinels_dir}/${name}-build
COMMAND ${CMAKE_COMMAND} -E touch ${sentinels_dir}/${name}-build
WORKING_DIRECTORY ${working_dir}
COMMENT "No build step for '${name}'"
DEPENDS ${sentinels_dir}/${name}-configure
VERBATIM
)
get_property(cmd_set TARGET ${name} PROPERTY AEP_BUILD_COMMAND SET)
if(cmd_set)
get_property(cmd TARGET ${name} PROPERTY AEP_BUILD_COMMAND)
else()
_aep_get_build_command(${name} BUILD cmd)
add_custom_command(
OUTPUT ${sentinels_dir}/${name}-build
COMMAND ${cmd}
COMMAND ${CMAKE_COMMAND} -E touch ${sentinels_dir}/${name}-build
WORKING_DIRECTORY ${working_dir}
COMMENT "Performing build step for '${name}'"
DEPENDS ${sentinels_dir}/${name}-configure
VERBATIM
)
endif()
add_external_project_step(${name} build
COMMAND ${cmd}
WORKING_DIRECTORY ${working_dir}
DEPENDEES configure
)
endfunction(add_external_project_build_command)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment