[CMake] Compiling static and shared library only once (wiki seems to have an error)

Hendrik Sattler post at hendrik-sattler.de
Fri Apr 17 14:23:12 EDT 2009


Am Freitag 17 April 2009 20:13:40 schrieb Shaun Cummins:
> Thanks, that solves one problem. I still haven't found a way to create
> both shared and static libraries by only compiling the source code
> once (on Linux). I can generate both types of libraries in one make
> command but each source file is compiled twice.
>
> Does anyone know how to do this?

You cannot as one has is compile as PIC and one as non-PIC.

HS



More information about the CMake mailing list