cmGlobalGenerator: clear RuntimeDependencySet members at configure
Commit f2617cf8 (Source: Add cmInstallRuntimeDependencySet,
2021-05-19) introduced via !6186 (merged) to 3.21 added storage to the global
generator for runtime dependency sets. However, this was not cleared at
the start of configure in the ClearGeneratorMembers()
method. When
using ccmake
to configure (and, presumably cmake-gui
too), projects
using install(TARGETS … RUNTIME_DEPENDENCY_SET)
would use dependency
set tracking instances from previous configure runs that held references
to targets free'd with the cmMakefile
instance that held them.
Clear the dependency sets at the beginning of configure so that they are not remembered and trigger via use-after-free bugs when used.
Fixes: #25446 (closed)
Backport: release
Edited by Ben Boeckel