After a while I realize I don’t need this option. So I remove it from my project.
However, it’s still in my cache. This can cause confusion for other developers who don’t realize I removed it. Since the value will still show up in cmake-gui.
Is there a way to automatically delete unused project cache variables?
This (old) feature request might be of interest though since it would basically end up tracking cache variables anyways. It could be extended to track non-advanced variables that aren’t used at all (though it’d likely be an extension).
I don’t think there’s a “supposed to” for this. Generally they just accumulate and if they start to get noisy, a refreshing the build tree is always an option.
That issue is the closest thing I’m aware of on the issue tracker. Anything related to this is likely going to share similar roots with what that needs.