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

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.


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?

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.

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.