diff options
author | Antonio Caggiano <quic_acaggian@quicinc.com> | 2023-05-10 09:46:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-10 13:56:31 (GMT) |
commit | 3bf0830e44426d0593adb3603bbb5fa95610a2b5 (patch) | |
tree | 1e2f938bfa0e924861bc143c67306a891e8842b8 /Modules/ExternalProject.cmake | |
parent | 65430031a61105f9c8bae57e3731fe133e931b11 (diff) | |
download | CMake-3bf0830e44426d0593adb3603bbb5fa95610a2b5.zip CMake-3bf0830e44426d0593adb3603bbb5fa95610a2b5.tar.gz CMake-3bf0830e44426d0593adb3603bbb5fa95610a2b5.tar.bz2 |
ExternalProject: Avoid adding empty touch command on "ALWAYS" steps
The problem fixed by commit c0b749cf62 (ExternalProject: Always add a
command to a step, 2014-11-05, v3.2.0-rc1~402^2~3) may occur for an
empty `COMMAND ${touch}` too, so avoid specifying any `COMMAND` at all
if there is no touch command.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index e2cc497..1fdd754 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -2447,7 +2447,7 @@ function(ExternalProject_Add_Step name step) PROPERTY _EP_${step}_ALWAYS ) if(always) - set(touch) + set(maybe_COMMAND_touch "") # Mark stamp files for all configs as SYMBOLIC since we do not create them. # Remove any existing stamp in case the option changed in an existing tree. get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -2469,7 +2469,7 @@ function(ExternalProject_Add_Step name step) file(REMOVE ${stamp_file}) endif() else() - set(touch ${CMAKE_COMMAND} -E touch ${stamp_file}) + set(maybe_COMMAND_touch "COMMAND \${CMAKE_COMMAND} -E touch \${stamp_file}") endif() # Wrap with log script? @@ -2497,7 +2497,7 @@ function(ExternalProject_Add_Step name step) BYPRODUCTS \${byproducts} COMMENT \${comment} COMMAND ${__cmdQuoted} - COMMAND \${touch} + ${maybe_COMMAND_touch} DEPENDS \${depends} WORKING_DIRECTORY \${work_dir} VERBATIM |