[Cmake] separate compiling and linking

Iker Arizmendi iker at research.att.com
Tue, 27 Apr 2004 13:12:35 -0400


William A. Hoffman wrote:
 > So, I think something like this will be your best bet:
 >
 > INCLUDE(dir1/dir1rules.cmake)
 > INCLUDE(dir2/dir2rules.cmake)
 > ADD_LIBRARY(BigLib ${DIR1_SRCS)  ${DIR2_SRCS})

If this captures both the "regular" source files
and the source files that result from flex/bison
and other generators then this would let CMake
build the big library without having to know
anything about what goes on in the subdirs.

Would this result in BigLib having to rebuild
the sources that were already built for each
of the subdirectory "dummy" libraries or would
CMake realize that they have been built already
and use existing objects?


Iker