I have a large-ish codebase which builds several dozen libaries and several executables.

The codebase is broken down hierarchically and libraries are build at pretty much every level.

I've gone through and placed a CMakeLists.txt file at each directory to build each library.

In each CMakeLists.txt I have used the "project( xxx )" directive. This has defined for me PROJECT_NAME, PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR variables which I make judicious use of.

However, one of the team is unhappy with this approach as he can't find any real world examples of anyone else having done this. He often cites the KitWare examples as not using this approach and therefore neither should we.

The alternative approach he is advocating is to set these variables up in each makefile which seems much like what "project" gives you.

I really can't see his point and am making little headway in convincing him otherwise. Can anyone shed any light on the downsides of using the project directive in this way.

I throw myself on your collective wisdom?

Edit
Report