[CMake] Change object output directory
David Cole
david.cole at kitware.com
Mon Aug 1 08:49:00 EDT 2005
It sounds to me like you'll need a completely separate binary tree for
each module that has differing compile time switches. If object files
are to be shared by multiple modules, they must all (in general) be
compiled with the same compile switches... If your compile switches
differ, you'll want separate object files. Which means multiple binary
trees.
You'll need to build in each binary tree after making a source change
that affects multiple modules.
Does this make sense?
HTH,
David
Qiyu Liu wrote:
>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
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
>
>
>
>
More information about the CMake
mailing list