In Beman.Optional26, the top-level CMakeLists.txt
has this:
add_subdirectory(src)
src/CMakeLists.txt
includes add_subdirectory(Beman)
. This is done similarly in src/Beman/CMakeLists.txt
I’m wondering if it would be good practice to omit CMakeLists.txt
files that simply pass control to another subdirectory. In in the above case, the top-level CMake file would instead use add_subdirectory(src/Beman/Optional26)
. I see two benefits:
- The GitHub interface recognizes directories with a single subdirectory allowing users to get to the interesting files with a single click.
- Less boilerplate. These passthrough CMakeLists.txt files probably need to also get a license notice, etc.
What do folks think?