FetchContent and options with same name
I'm currently make heavy use of FetchContent and stumbled over a little problem. When I want to set some option before including the project, it's possible when I just define a cache var with the wanted value (I had to overwrite option to get the right HELPSTRING later, but that's another story).
My problem came visible with BUILD_TESTING. When my project has set this to on, but I don't want the tests of the subproject, I could set it OFF before inclusion, and back ON after that. But as I don't have influence on the stuff the included project does, I get warnings about CMP0077 at some places. If I do the changes in the cache, I don't get warnings, but while generation the stamp seems to get created before the chache-changes, and the build-run first reruns config-step. This is heavily annoying i. e. on VisualStudio as this asks me after the build to reload the changed projects.
Maybe I oversee the obvious, but for now I see no easy solution for this. Maybe it's possible to to something like a displayname for the options, so subprojects get prefixed with projectname in higher projects and see the original name only in their scope. This would make the options in cmake-gui a bit more sorted,too.