Enhancement: Let mark_as_advanced apply prospectively
At the moment, many FindXXX.cmake modules are littered with multiple mark_as_advanced()
commands, after the relevant variables have been defined.
It would have been more convenient to just have a single mark_as_advanced()
command at the beginning of each module, with the CACHE variables it defines but which are advanced; and the changes in v3.17 bring us close to this being possible, but not quite. At the moment, such a statement would not create dummy cache entries - which is good - but it will not ensure that, when the variables are defined, they'll be marked as advanced.
Thus, I suggest the behavior of mark_as_advanced()
be changed so as to apply definitions after the command, but within the same file (= included module). Alternatively - within the current scope; that's probably easier to implement, but I'm not sure it's the right thing to do.