Here is a link to a public repository to show the problem:
The instructions are in the readme.md but I’ll repeat them here:
By default cmake options do not support incremental builds. If a component A imports component B and B defines an option (say FOO) that A does not explicitly set, any change (in B) of the default value of FOO will be silently ignored by cmake (when doing incremental builds). With the config helper the incremental build will fail, which is still not good but better than silently producing bad binaries.
How to reproduce:
Run cmake and build normally. Run the executable and see this message. .\A.exe FOO = ON In B/CMakeLists.txt change the default for FOO from ON to OFF (o vice versa) Do an incremental build. The change from step 2. is ignored. Cmake re-runs but nothing is rebuilt .\A.exe FOO = ON