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

2014-01-23 Thread Paul Smith
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

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

2014-01-23 Thread Paul Smith
On Thu, 2014-01-23 at 10:22 -0500, Brad King wrote: > On Thu, Jan 23, 2014 at 8:03 AM, Paul Smith wrote: > > add_library(mylib STATIC $) > [snip] > > The Makefile generators work fine > > > > For Xcode, though, the link fails: > > This is a known limitation. From the add_library documentation:

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

2014-01-23 Thread Brad King
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). Also be sure to set the POSITION_INDEPENDENT_CODE target p

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

2014-01-23 Thread Brad King
On Thu, Jan 23, 2014 at 8:03 AM, Paul Smith wrote: > add_library(mylib STATIC $) [snip] > The Makefile generators work fine > > For Xcode, though, the link fails: This is a known limitation. From the add_library documentation: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:add_li

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

2014-01-23 Thread Paul Smith
Hi all. I'm using CMake 2.8.12.1 on Linux, MacOS, and Windows. I've discovered a bug in the Xcode generator when dealing with OBJECT and STATIC libraries. This example works fine on Linux, and on MacOS with the Makefile generator. I also haven't noticed a problem on Windows (MSVC). What I'm do