diff options
author | Brad King <brad.king@kitware.com> | 2014-02-21 15:59:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-02-21 16:05:41 (GMT) |
commit | 73e5c6aead4d2c748ced061a7de27f2ffc7e2d31 (patch) | |
tree | 47c036f093ad4e4d5c334cbacb188f3316f6ee04 /Modules/ExternalProject.cmake | |
parent | c0bbefbfe7209e849c04f57e79908401ba825fe0 (diff) | |
download | CMake-73e5c6aead4d2c748ced061a7de27f2ffc7e2d31.zip CMake-73e5c6aead4d2c748ced061a7de27f2ffc7e2d31.tar.gz CMake-73e5c6aead4d2c748ced061a7de27f2ffc7e2d31.tar.bz2 |
ExternalProject: Add option to always run the build step
Teach ExternalProject_Add a new BUILD_ALWAYS option to skip using
the build step stamp file and execute the step on every build.
Extend the BuildDepends test with a case to cover this option.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 0df51a8..1e83163 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -54,6 +54,7 @@ # [BINARY_DIR dir] # Specify build dir location # [BUILD_COMMAND cmd...] # Command to drive the native build # [BUILD_IN_SOURCE 1] # Use source dir for build dir +# [BUILD_ALWAYS 1] # No stamp file, build step always runs # #--Install step--------------- # [INSTALL_DIR dir] # Installation prefix # [INSTALL_COMMAND cmd...] # Command to drive install after build @@ -1716,10 +1717,18 @@ function(_ep_add_build_command name) set(log "") endif() + get_property(build_always TARGET ${name} PROPERTY _EP_BUILD_ALWAYS) + if(build_always) + set(always 1) + else() + set(always 0) + endif() + ExternalProject_Add_Step(${name} build COMMAND ${cmd} WORKING_DIRECTORY ${binary_dir} DEPENDEES configure + ALWAYS ${always} ${log} ) endfunction() |