Default values for cache variables

Hi all,

A long-ago feature request (I filed it 10 years ago!) has finally had some interest in a prerequisite feature: CMake needs to know what the default value for user options are in order to report “here’s what you’ve done to configure this build”. This (later) feature would allow something like cmake -E make_cache_init to take a build tree and dump out a file that can be passed to cmake -C to recreate the build.

But first is teaching CMake to understand that the “default” value passed to option() or set(CACHE) is pinned on the first configure; updating the default in the code does not update older builds.

The full design proposal is here. Feel free to comment here for discussion related to the feature, but anything about the specific proposal should go to the issue.