# When building VS project every time, CMake configuration run again.

**URL:** https://discourse.cmake.org/t/when-building-vs-project-every-time-cmake-configuration-run-again/9603
**Category:** Usage
**Created:** [December 11, 2023, 10:17am UTC](https://discourse.cmake.org/t/when-building-vs-project-every-time-cmake-configuration-run-again/9603 "2023-12-11T10:17:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jerry\_Guo](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jerry_guo/32/4075_2.png) [@Jerry\_Guo](https://discourse.cmake.org/u/Jerry_Guo)
#### Post date: [December 11, 2023, 10:17am UTC](https://discourse.cmake.org/t/when-building-vs-project-every-time-cmake-configuration-run-again/9603/1 "2023-12-11T10:17:05Z")

</div>

Hi,  
I am using CMake GUI on Windows 10. First I set the source directory and build directory on CMake GUI. Then click the configuration button and generate the Visual Studio project. And there isn’t any error here. After that, I opened the project in VS. When I clicked on the build solution of VS, I saw that the CMake configuration ran again and the output info could be seen in the output window of VS. I want to know the reason, and how to disable this behavior.

---

<div class="post-metadata">

### Author: ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)
#### Post date: [December 11, 2023, 10:30am UTC](https://discourse.cmake.org/t/when-building-vs-project-every-time-cmake-configuration-run-again/9603/2 "2023-12-11T10:30:16Z")

</div>

Hi.

Does this happen with every build, or just the first one after a configuration+generation in CMake GUI?

Is there something in your CMake code that could modify your inputs to CMake, causing a cyclic dependency? Can you share your CMake code?

---

<div class="post-metadata">

### Author: ![Jerry\_Guo](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jerry_guo/32/4075_2.png) [@Jerry\_Guo](https://discourse.cmake.org/u/Jerry_Guo)
#### Post date: [December 11, 2023, 1:34pm UTC](https://discourse.cmake.org/t/when-building-vs-project-every-time-cmake-configuration-run-again/9603/3 "2023-12-11T13:34:44Z")

</div>

Thanks for your reply. This happened with every build. I was building ITK-SNAP software, which was a medical image software. The code is [https://github.com/pyushkevich/itksnap](https://github.com/pyushkevich/itksnap).

---

<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: [December 11, 2023, 3:07pm UTC](https://discourse.cmake.org/t/when-building-vs-project-every-time-cmake-configuration-run-again/9603/4 "2023-12-11T15:07:08Z")

</div>

If there’s some way to determine why VS is regenerating, that would be good. Something akin to `ninja -d explain` which reports on discovered timestamp updates or the like.
