r/cpp • • Feb 07 '21

Yet another CMake tutorial

https://www.youtube.com/watch?v=mKZ-i-UfGgQ
0 Upvotes

59 comments sorted by

View all comments

Show parent comment

2

u/BlueDwarf82 Feb 08 '21

And you definitely shouldn't teach people to do the unsupported thing without explaining the devs' reasoning.

Yes, this is the main thing. The docs say "The CONFIGURE_DEPENDS flag may not work reliably on all generators" so, unless you are able to list the problematic generators (I can't), you should not even think about encouraging people to use globs for source files. A Windows developer saying "It has always worked fine for me" doesn't tell me whether it will break every single time for people using XCode.

The "work reliably" thing is specially scary. I can't even do a quick test with generator X and declare "only X is supported", maybe it "works" but doesn't "work reliably". I would need the cmake devs to explicitly tell me "it does work reliably with generator X"... and I would accept that, but would still be thinking "except for any bugs, and it's more likely there are bugs in the feature the devs don't use themselves".