ExternalProject: Avoid reconfigure when updates are disconnected
When UPDATE_DISCONNECTED
is true, create separate update_disconnected
and patch_disconnected
targets which have ALWAYS
set to false. Make the configure
step depend on patch_disconnected
in this case too. This ensures the configure
, build
, install
and test
steps are not executed unnecessarily when updates are disconnected.
Make the update
and patch
commands depend on the details of those steps. This ensures they are re-executed when any of those details change, even if updates are disconnected.
Allow updates to occur even if UPDATE_DISCONNECTED
is true, but don't contact the remote in that case. If asked to update to a ref that isn't known locally, that is now detected and causes a fatal error when updates are disconnected. Previously, the build would have silently and erroneously continued to use the old ref.