[CMake] both debug and release recursive

Brian Budge brian.budge at gmail.com
Fri Apr 2 15:55:45 EDT 2010


Hi all -

This is my first post here, so feel free to set me straight if I
do/say something dumb.  On to my question:

I'm setting up a build using cmake where the directory structure looks
like this:

build
app/build
app/src
project1/build
project1/p1lib1
project1/p1lib2
project1/p1lib3
project2/p2lib

I have a cmake that will build app already, and some preliminary cmake
files in project1 which recursively build the libraries in project1.
Haven't looked at project2 yet.

I would like to be able to build debug and release similar to what is
discussed here:
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_multiple_modes_without_switching_.3F

It seems quite easy to do this with a single CMakeLists.txt file, but
with recursion, I'm not seeing a simple way of making this happen.  I
could glue it together with scripts to make it run on Linux, but then
I'm not sure of an elegant way to make it work for visual studio
projects... and really, we're using cmake to get some level of
platform independence in the first place, so that idea isn't a good
one.

Can anyone make a suggestion as to the best way to deal with this?

Thanks,
  Brian


More information about the CMake mailing list