MantisBT - CMake
View Issue Details
0015038CMake(No Category)public2014-07-25 07:052015-01-05 08:39
Jamie Kirkpatrick 
Brad King 
normalminorhave not tried
closedfixed 
OS X10.10
CMake 3.0 
CMake 3.0.1CMake 3.0.1 
0015038: Linking $<TARGET_OBJECTS:...> into a static library is broken with Xcode 6
Trying to use $<TARGET_OBJECTS:...> to link an object target into a static library is broken with Xcode 6 because it uses separate flags for linking static libraries.
- Create an object library target with a source file compiled in.
- Create a static library that links the object library in.
- Create a binary that uses something from the original source file and links the static library in.
- Compiling will result in undefined symbols.
Previously the OTHER_LDFLAGS variable was respected but now it uses OTHER_LIBTOOLFLAGS which breaks things because the old variable was used to specify the list of extra object files to link into the static library target.
No tags attached.
Issue History
2014-07-25 07:05Jamie KirkpatrickNew Issue
2014-07-25 08:17Jamie KirkpatrickNote Added: 0036464
2014-07-28 13:16Brad KingNote Added: 0036478
2014-07-28 13:16Brad KingAssigned To => Brad King
2014-07-28 13:16Brad KingStatusnew => assigned
2014-07-28 13:16Brad KingTarget Version => CMake 3.0.1
2014-07-31 14:46Brad KingStatusassigned => resolved
2014-07-31 14:46Brad KingResolutionopen => fixed
2014-07-31 14:46Brad KingFixed in Version => CMake 3.0.1
2015-01-05 08:39Robert MaynardNote Added: 0037605
2015-01-05 08:39Robert MaynardStatusresolved => closed

Notes
(0036464)
Jamie Kirkpatrick   
2014-07-25 08:17   
I threw together a quick patch that fixes the issue, but the tests are now broken. I unfortunately don't have the time to work out how to fix them.

https://github.com/Kitware/CMake/pull/115 [^]
(0036478)
Brad King   
2014-07-28 13:16   
Thanks. The problem in the pull request is that the choice of build setting name depends on the type of the current target (STATIC or not) as well as the version of Xcode. Fixed here:

 Xcode: Fix static library creation for Xcode 6
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=608cf814 [^]
(0037605)
Robert Maynard   
2015-01-05 08:39   
Closing resolved issues that have not been updated in more than 4 months