CMake sometimes not rerun automatically from Visual Studio?

Hi,

I’m still new to MSVC…
Sometimes I edit one of the CMakeLists.txt, and when building then in Visual Studio (not VSCode), it does not rerun cmake so the project files are not regenerated. Also building “ZERO_CHECK” does nothing.
This is Visual Studio 2017 15.9.50 using projects generated by CMake 3.24.1.

Is this a known issue ?
Am I doing something wrong ?
Is “ZERO_CHECK” the target which should rerun CMake ?

Also, is there a target to rerun cmake-gui, ?

Thanks
Alex

In VS the ZERO_CHECK target is depended upon by all other targets and so should build first. It should have rules to re-run CMake when the CMakeLists.txt files or transitive inputs change.

We do have nightly testing for this. The RunCMake.Configure test has several RerunCMake cases that cover re-running CMake automatically when the inputs change.

I tried this locally with CMake 3.24.2 and VS 2017 15.9.51 using the Tests/COnly project in CMake’s source tree. Editing the CMakeLists.txt file does cause CMake to automatically re-run on the next build as expected.

It’s only that sometimes it does not work in that project.
It’s a relatively big project, and sometimes ZERO_CHECK seems not to regenerate the project.
I haven’t found out yet what the exact conditions are.
It feels like if I do bigger changes it works, but not after just a quick change, like if the time difference was too small.

Can I find (and check) the list of dependencies somewhere ?

Related, is it normal that, if I build a target foo and ZERO_CHECK does trigger cmake, that the updated project files are only loaded after foo has finished building ?