ExternalProject: Fix UPDATE_DISCONNECTED with empty update steps

When `UPDATE_DISCONNECTED` is enabled the post-update steps
unconditionally depend on a `skip-update` step instead of `update`.
Make `skip-update` available whenever `UPDATE_DISCONNECTED` is enabled,
whether there is a real update step or not.

Closes: #16428
This commit is contained in:
Brad King
2016-11-14 10:44:04 -05:00
parent 4a4be0301b
commit 4deaa25f46
2 changed files with 3 additions and 2 deletions

View File

@@ -2165,12 +2165,12 @@ Update to Mercurial >= 2.1.1.
${uses_terminal}
)
if(always AND update_disconnected)
if(update_disconnected)
_ep_get_step_stampfile(${name} skip-update skip-update_stamp_file)
string(REPLACE "Performing" "Skipping" comment "${comment}")
ExternalProject_Add_Step(${name} skip-update
COMMENT ${comment}
ALWAYS 1
ALWAYS ${always}
EXCLUDE_FROM_MAIN 1
WORKING_DIRECTORY ${work_dir}
DEPENDEES download

View File

@@ -131,6 +131,7 @@ ExternalProject_Add(${proj}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR>
INSTALL_COMMAND ""
LOG_BUILD 1
UPDATE_DISCONNECTED 1
)
set_property(TARGET ${proj} PROPERTY FOLDER "Local/TGZ")