[CMake] Intertwined projects.

Mathias Sulser suls at suls.org
Thu Aug 4 06:31:16 EDT 2011


Hello.

This is my first post on this ML - so hi to everyone.
I have been playing around with CMake for a while now and would love
to introduce it to our projects. However, I wasn't able to answer the
question below myself. Help appreciated.

Short version:
How do you layout internal project dependencies in CMake from multiple
repositories? Is ExternalProject, a super build or something else the
way to go?

Long version:
I have the following project/repo layout:

app1.git
  /src
  /include
  /test
  CMakeLists.txt

app2.git
  ..

libA.git
  ..

libB.git
  ..


I was thinking of using ExternalProject_Add in app1's CMakeLIsts.txt
to declare it's dependencies on libA and libB. This works fine, it
even allows pointing to a local git repo and branch on the dev boxes.

Now, if I bring a central CI server (i.e. jenkins) into play, the
INSTALL command required for ExternalProject screws things up for me.
I can't have app1 depending on v1 of libA and app2 on v2 of libA as
both get installed in the same location.

Any ideas how to solve this? Am I misusing ExternalProject's
functionality for internal dependencies?

Cheers,
Mathias


More information about the CMake mailing list