[CMake] [2.8.12.1] Bug in Xcode generation of STATIC from OBJECT libraries

Paul Smith paul at mad-scientist.net
Thu Jan 23 11:55:22 EST 2014


On Thu, 2014-01-23 at 11:40 -0500, Brad King wrote:
> On 01/23/2014 11:36 AM, Paul Smith wrote:
> > I see.  That's a shame :-(.
> 
> Unfortunately it is an Xcode limitation that CMake cannot work around.
> 
> > Kind of unpleasant.  Anyone have any ideas?
> 
> Add an "empty.c" source protected by if(XCODE).

Yeah, I thought about that.  Tested it here and it worked.  OK, I can
manage that.  Plus it gives me a handy place to put a snarky comment
about Xcode :-p :-)

> Also be sure to set the POSITION_INDEPENDENT_CODE target property
> on the object libraries to make sure the objects can be used in
> a shared library.

I've been adding -fPIC by hand but this property looks nicer; I'll check
it out.

Thanks Brad!




More information about the CMake mailing list