On 11/3/2011 1:19 PM, Paul Whelan wrote:
Hi guys,

I have a possibly naive question about cmake. I've got three
applications that build with cmake. Normally they build and run
independently. However, for a particular release I have to combine them
in a source distribution. I wanted to create a cmake script in a parent
directory containing all three source trees and give the end-user one
simple cmake command to run. Sounds simple enough.

The problem I run into in doing that is that with the CMakeList.txt
files of each source tree, there are some directory references relative
to ${CMAKE_BINARY_DIR} and ${CMAKE_SOURCE_DIR}. So, when cmake is run
from a higher level directory, these directory macros are one level up
from where they normally are and it throws off the build.

The question I have is "Is there a way to use cmake in a parent
directory to recursively invoke cmake on the CMakeList.txt files in each
of these source trees such that the source and binary root directories
are set to what they are normally expected to be?


You should look at the ExternalProject module.

-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to