Do not rerun CMake (with wrong parameters) if CMakeCache.txt was deleted since the last run
(I typically use Ninja for my builds, so will assume it here, but I guess other generators might behave similarly)
I usually run CMake like cmake .. -G Ninja
to generate rules for Ninja (one rule being the automatic re-run of CMake if a build file changes - which is convenient and works in most cases).
Problem: If I "accidentally" delete CMakeCache (i.e. to test some changes to the build system), and (without remembering to invoke CMake again) run ninja it will re-run CMake for me.
Result: Ninja re-runs CMake - but without parameters! This will obviously result in a completely different generator being used and will likely mess up the build directory badly.
Ideal case: Ninja will re-run CMake with the parameters used when running CMake for the very first time.
Not so ideal but still better case: Don't re-run CMake if CMakeCache is missing but warn the user about the problem.