# avoid performing update step for externalproject

**URL:** <https://discourse.cmake.org/t/avoid-performing-update-step-for-externalproject/4117>\
**Category:** Code\
**Created:** [September 20, 2021, 7:16am UTC](https://discourse.cmake.org/t/avoid-performing-update-step-for-externalproject/4117 "2021-09-20T07:16:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hex](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hex/32/363_2.png) [@hex](https://discourse.cmake.org/u/hex)\
**Post date:** [September 20, 2021, 7:16am UTC](https://discourse.cmake.org/t/avoid-performing-update-step-for-externalproject/4117/1 "2021-09-20T07:16:09Z")

</div>

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

```cmake
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.

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [September 20, 2021, 2:19pm UTC](https://discourse.cmake.org/t/avoid-performing-update-step-for-externalproject/4117/2 "2021-09-20T14:19:19Z")

</div>

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).
