I am working on a large project, and we are thinking about how to organize a large assembly. I think this should / could have been done with cmake, but currently I donโt know how all our requirements can be satisfied.
Here is what our project organization looks like:
- A project consists of several subprojects (called assembly modules)
- each build module can consist of several parts that create either static or dynamic libraries, executable files, or tests.
- assembly modules may depend on the open interface of other assembly modules.
- To quickly create time, each build module must be built on a separate CI server. Dependencies should not be created every time, but extracted from some binary repository (we think of nuget here, but the network resource may be the simplest solution)
Given cmake, I think of a directory structure like this
- Root directory
- Build Module 1
- Build Module 1 Static Lib
- Build Module 1 Unit Test
- Build Module 1 Public Interface
- Build Module 2
- ...
- Build Module n
First question: where to start placing CMakeLists.txt files? I would start from the build module level, not from root. Thus, the developer can create his own if he wants to create only modules 3, 4 and 5.
: /. , , , . , - find_package xxxConfig.cmake/FindXXX.cmake. - , ? ? cmake?
: - , nuget ? cpack? ? cpack nuget ( , - )?
.
Tobias