I’m looking into adding a DIRECTORY property SUBDIRECTORIES_RECURSE.
Currently I implemented this in cmake script, but getting the SUBDIRECTORIES property and then iterating over them to get all their SUBDIRECTORIES feels a bit much for the cmake language. Also it seems to be a bit slow.
I need this in order to collect all targets in all subdirs and then set some properties on each of them.
So I had a look at how the SUBDIRECTORIES property is implemented. So this is done in cmStateDirectory class. I have a bit a hard time figuring out how to add a recursive version there. I was assuming I would somehow see a vector of cmMakefile for each added subdirectory, but this is not the case.
Should I get the SUBDIRECTORY property and then get the cmMakefile for each of the returns dirs ? Or is there a more direct way to collect all the subdirs ?
Thanks for pointers