[CMake] Adding -fPIC to static libraries
Brad King
brad.king at kitware.com
Wed Mar 1 16:31:18 EST 2006
Prakash Punnoor wrote:
> Am Mittwoch März 1 2006 21:06 schrieb Brad King:
>
>>Prakash Punnoor wrote:
>>Supporting this in CMake is tricky. The problem we face that libtool
>>does not is supporting Windows compilers (correct me if I'm wrong I have
>>not checked this).
>
> Not that I know of. Thinking again, it might be that the difference with cmake
> would be much less porblematic, if cmake would have "convenience libs" such
> that these are "static" libs which don't get installed but can be used for
> linkinginto static/shared libs and exes. CMake could decides itself whether
> it need to compile the convenience libs' objects twice or only pic or non-pic
> (unlike libtool which does it always twice). Wouldn't this be a feasable
> option? Should be fairly easy to handle by cmake. It just needs to compile
> max two static libs, one with pic, one without.
It is definately worth investigating but I'm not sure when we can get to
it. You can add a feature request here:
http://www.cmake.org/Bug
> While we're at it: You probably want to disallow "-" in target names, as it is
> not portable, as I experienced. At least nmake in Windows complains and
> errors out.
This is just a generator bug. I think it was fixed in CVS recently.
-Brad
More information about the CMake
mailing list