[CMake] Change object output directory

Qiyu Liu cmake at qlat.com
Sun Jul 31 15:43:27 EDT 2005


My program has multiple binaries that each create objects from the same
source files.  However, each binary creates these objects differently,
which is controlled a compile-time switch.

CMake by default seems to output the objects in the same directory as
the source.  Thus, one binary would see the objects created by another
binary and use them rather than compiling its own version.  Until now, I
had been compiling one binary, running make clean, then compiling
another binary.  Obviously, this is horribly inefficient if you only
make a small change and don't want to recompile everything.

Is there an option in CMake to specify where the object files are output
so I can avoid this conflict?

-Q


More information about the CMake mailing list