avoid performing update step for externalproject

the following code performs an update step even so the git hash is up to date:

cmake_minimum_required(VERSION 3.20)
project(MyProj)

include(ExternalProject)
ExternalProject_Add(foo
  LOG_DOWNLOAD ON
  LOG_UPDATE ON
  LOG_CONFIGURE ON
  GIT_REPOSITORY https://gist.github.com/c61dbb39bca0e4fb7d1f73b0d66a4fd1
  GIT_TAG        dea7d40ab970ce728991654c04d2117b5f976f88
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND ""
)

the download method supports updates. After first build the commit hash corresponds to HEAD, the hash is valid. I confirmed this in external project log output, and git itself. Therefore, the git remote repository should not be checked.

Rebuilding the project shows Performing update step for 'foo'. I am trying to set No update step for 'foo', instead. Any hint what could be wrong?

thank you for your attention.

You probably want to pass UPDATE_DISCONNECTED 1 for this project. It will update if the hash changes, but won’t be considered if only the build needs to run (e.g., a dependency changed).