Every single project I have the same line of code.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
Why is this not just on by default for users?
I’ll admit the 2 generators I primarily use are Visual Studio / Ninja.
So I might just not know the situation which necessitates this.
But I do know that some users are also confused as to why this isn’t the default as well.
It’s probably not the default due to backwards compatibility guarantees.
Due to backwards compatibility with older visual studio versions? Or just in general not trying to introduce new behavior clients didn’t ask for?
Backwards compatibility guarantees in CMake’s behaviors.
Perhaps having this on by default for 2017 or 2019 and onward is reasonable?
I think it is only for compatibility that
USE_FOLDERS is not default. We could make it the default using a policy. I’ve opened CMake Issue 21695 for this.