How to handle dependency between C++ CMake projects using Bamboo CI?
I have two C++ CMake projects A and B, where B depends on A and I'm using Atlassian's Bamboo as continuous integration software. Is there a good way to define the dependency between the two projects? maybe within Bamboo or maybe a CMake feature.
Ideally I'd like project A to be built regularly. Then some possible manual solutions are whenever B builds:
- point to the location where project A's .h and lib files are. This location has to be consistent so it works in development environments as well as in the CI system.
- every time project A builds generate the needed artifacts (headers and library files) and copy them to a predefined location. Though this looks more like continuously releasing.
- A maybe uglier approach would be to have Plan B fetching and building project A before building but this adds a lot of overhead to B separate from not being natively supported by the SCM Bamboo plugins that only look at one repository location.
CMake can call CMake. Maybe you can use your solution 2, and call the compilation of the project_A (with CMake) from the CMake files of your project_B ?