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.
2 Likes
ben.boeckel
(Ben Boeckel (Kitware))
January 8, 2021, 6:54pm
2
It’s probably not the default due to backwards compatibility guarantees.
Cc: @brad.king
Due to backwards compatibility with older visual studio versions? Or just in general not trying to introduce new behavior clients didn’t ask for?
ben.boeckel
(Ben Boeckel (Kitware))
January 11, 2021, 9:17pm
4
Backwards compatibility guarantees in CMake’s behaviors.
Perhaps having this on by default for 2017 or 2019 and onward is reasonable?
brad.king
(Brad King)
January 12, 2021, 3:37pm
7
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.
In 3.26 USE_FOLDERS will be treated as ON by default via a policy.
CMP0143: USE_FOLDERS global property is treated as ON by default
1 Like