[CMake] Why are object files built several times?

Joachim Ziegler ziegler at mpi-sb.mpg.de
Wed Sep 26 07:55:52 EDT 2007


Hello,

I have two targets that have nearly the same sources:

ADD_EXECUTABLE(startCompletionServer StartCompletionServer.cpp ${BASEFILES})
ADD_EXECUTABLE(test-adler32 test-adler32.cpp ${BASEFILES})

I wonder why every object file belonging to the BASEFILES is built 
twice, once for the first target, once again for the second. This 
doubles my compile time!?

Joachim



More information about the CMake mailing list