I replaced my references to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR and
was able to get both projects to build in the same build director. My
top level basically builds a project in my src directory, and another
project in my src/Dataflow directory. However, when I run make, I get
errors like the following:
CMakeFiles/Makefile2:1995: warning overriding commands for target
'src/Dataflow/CMakeFiles/Continuous.dir/all'
CMakeFiles/Makefile2:853: warning ignoring old commands for target
'src/Dataflow/CMakeFiles/Continuous.dir/all'
Has anyone ever seen this before when building two nested projects? It
doesn't happen if I only build one of the projects.
Thanks.
-darby j
Alexander Neundorf wrote:
-------- Original-Nachricht --------
Datum: Thu, 07 Dec 2006 17:50:12 -0500
Von: Darby J Van Uitert <[EMAIL PROTECTED]>
An: [email protected]
Betreff: [CMake] combining projects
Hi,
I have a current project building under CMake which has multiple parts
that I want to keep separate. It has a group of core libraries, and
then an application with a gui that is separate--very similar to the
Insight Toolkit and Insight Applications except for they are in the same
repository and source tree. Currently, I build the core libraries by
pointing CMake to the top level of my source tree, and then separately
build the gui part by pointing CMake to a child directory
(src/Dataflow). Is it possible to allow the top level CMake file to give
users the option to build core and the gui? I thought it would be just a
matter of making a SUBDIRS call to the src/Dataflow/CMakeLists.txt file
directory but that didn't work off the bat. What is involved in making
this transition?
What didn't work ?
I think if you avoid using CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR and instead
use the PROJECT_ variants it should work already better. You also probably have
to make sure that you don't have multiple targets with the same name.
Bye
Alex
--
Darby J Van Uitert
SCI Institute
University of Utah
Email: [EMAIL PROTECTED]
Phone: (301) 528-8469
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake