CMake Build Files Structure
The correct format is automatically enforced by the pre_commit utility.
Inside
srcdirectories, there is oneCMakeLists.txtper directory that:adds the contents of that directory to the build.
adds subdirectories to the build.
it does not add files from subdirectories.
Each
CMakeLists.txthas this format:One empty line between logical blocks and one at the end.
4 spaces indentation for code blocks.
8 spaces indentation inside commands.
Files and directories sorted alphabetically.