Chris Glover wrote:
At the moment we don't need the headers except for IDE projects, but if/when we transition to modules, we'll also have to transition to handling headers with CMake file sets.
In my opinion CMake GLOB should not be used at all; instead explicitly listing all sources, including headers, should be the preferred pattern.
Not sure that maintainers will find it convenient to list headers explicitly. :-)
No, I'm sure. I certainly didn't at first, but I got used to it using Bazel and found the upside to be worth it.
There are also downsides. If you add a header, but forget to add it to the CMakeLists.txt file (not an uncommon occurrence), everything will appear to work fine, but the header will not be installed. This may go undetected for a long time if the test suite does not exercise every header (or does not test installation at all, also not an uncommon occurrence) and if the header is only needed rarely.