[CMake] Multiple executables sharing object files

Brandon Van Every bvanevery at gmail.com
Wed Dec 19 16:24:59 EST 2007


On Dec 19, 2007 3:52 PM, David Cole <david.cole at kitware.com> wrote:
> Compilation time is only multiplied if you are specifying the same source
> file in multiple targets. If you are seeing a 2x difference, then you must
> have *all* of your source files listed twice. Shouldn't this only be for a
> few of your source files at most?

How would you know?  It would depend entirely upon his hierarchy of
source file abstractions.  A static library cannot include another
static library.  That severely limits abstractions.  That's why you
guys end up talking about silliness like "one static lib per exe."
There are no available abstractions to do otherwise.  I didn't want to
be forced to recompile PCRE 6 times for all its different consumers,
when I knew jolly well they were all supposed to receive exactly the
same objects, no flag variations whatsoever.  I didn't want the end
user to be aware of PCRE, it was an implementation detail of Chicken
that they should never have to think about.


Cheers,
Brandon Van Every


More information about the CMake mailing list