Re: [CMake] Recursive object libraries

2013-05-09 Thread Jonathan Anderson
On 3 May 2013 13:26, Jonathan Anderson jonathan.ander...@cl.cam.ac.ukwrote: Thanks very much for adding add_library(OBJECT); it's Just the Thing™ for organising source files that go into large libraries. It seems that I can't use it recursively, however: I have created a patch that seems to

Re: [CMake] Recursive object libraries

2013-05-09 Thread Brad King
Hi Jon, Thanks for looking at this. On 05/09/2013 09:42 AM, Jonathan Anderson wrote: I have created a patch that seems to provide the functionality that I want (attached). The patch looks interesting. We'll need it to include documentation and tests for the feature before acceptance. First,

Re: [CMake] Recursive object libraries

2013-05-09 Thread Jonathan Anderson
Hi Brad, I've attached a CMakeLists.txt file that demonstrates what I want to do (and what I can do with my patch). It models a directory hierarchy in a single file and uses the object library mechanism to accumulate objects recursively. I'm not familiar with the CMake testing framework. When

Re: [CMake] Recursive object libraries

2013-05-09 Thread Brad King
On 05/09/2013 11:12 AM, Jonathan Anderson wrote: I've attached a CMakeLists.txt file that demonstrates what I want to do (and what I can do with my patch). Thanks, that makes sense. Does add_library(... SHARED OBJECT ...) work? I think you mean to set the POSITION_INDEPENDENT_CODE target

[CMake] Recursive object libraries

2013-05-03 Thread Jonathan Anderson
Thanks very much for adding add_library(OBJECT); it's Just the Thing™ for organising source files that go into large libraries. It seems that I can't use it recursively, however: Only executables and non-OBJECT libraries may reference target objects. I'd like to use the same mechanism to