adentinger / CMakeBestPractices

A reference CMake configuration for fairly scalable open-/closed-source C/C++ projects
MIT License
2 stars 0 forks source link

Put public headers with along .cpp files #97

Closed adentinger closed 8 months ago

adentinger commented 8 months ago

Currently they are in a separate include/ directory. This was done to make the CMake file(GLOB_RECURSE ...) simpler to differentiate between public and private headers, but after experimenting with this, this makes it a bit annoying to quickly switch between the .cpp file and it main header in cases where the IDE isn't configured to magically know where each one is.

Instead, the public headers should be along with the .cpp files, and the private headers should be inside a private/ subdirectory inside the source directory.