diff options
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 32f6d2c..e5616b1 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -132,6 +132,9 @@ Create custom targets to build projects in external trees Use source dir for build dir ``BUILD_ALWAYS 1`` No stamp file, build step always runs + ``BUILD_BYPRODUCTS <file>...`` + Files that will be generated by the build command but may or may + not have their modification time updated by subsequent builds. Install step options are: @@ -234,6 +237,9 @@ Create custom targets to build projects in external trees Steps that depend on this step ``DEPENDS <file>...`` Files on which this step depends + ``BYPRODUCTS <file>...`` + Files that will be generated by this step but may or may not + have their modification time updated by subsequent builds. ``ALWAYS 1`` No stamp file, step always runs ``EXCLUDE_FROM_MAIN 1`` @@ -1409,6 +1415,9 @@ function(ExternalProject_Add_Step name step) # Dependencies on files. get_property(depends TARGET ${name} PROPERTY _EP_${step}_DEPENDS) + # Byproducts of the step. + get_property(byproducts TARGET ${name} PROPERTY _EP_${step}_BYPRODUCTS) + # Dependencies on steps. get_property(dependees TARGET ${name} PROPERTY _EP_${step}_DEPENDEES) foreach(dependee IN LISTS dependees) @@ -1466,6 +1475,7 @@ function(ExternalProject_Add_Step name step) add_custom_command( OUTPUT ${stamp_file} + BYPRODUCTS ${byproducts} COMMENT ${comment} COMMAND ${command} COMMAND ${touch} @@ -2139,8 +2149,11 @@ function(_ep_add_build_command name) set(always 0) endif() + get_property(build_byproducts TARGET ${name} PROPERTY _EP_BUILD_BYPRODUCTS) + ExternalProject_Add_Step(${name} build COMMAND ${cmd} + BYPRODUCTS ${build_byproducts} WORKING_DIRECTORY ${binary_dir} DEPENDEES configure ALWAYS ${always} |