[CMake] Multiple executables sharing object files

Brandon Van Every bvanevery at gmail.com
Wed Dec 19 12:25:02 EST 2007


On Dec 19, 2007 11:28 AM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>
> Maybe I am missing something, but why not create a static library and
> share it with the executables?

The end product may not be an executable, it may be a static library.
A static library cannot include another static library.  I came up
with a hack to find CMake's objects and reuse them, so that the user
of a static library would not have to add additional link flags.  In
particular, I wanted the user to be able to specify -lchicken, and not
have to specify -lchicken -lpcre.


Cheers,
Brandon Van Every


More information about the CMake mailing list