Re: [CMake] SHARED library containing OBJECT library: Missing -fPIC

2012-06-25 Thread David Cole
On Sun, Jun 24, 2012 at 10:05 AM, Benjamin Eikel cm...@eikel.org wrote: Hello Leif, Am Freitag, 22. Juni 2012 um 15:55:55 schrieb Leif Walsh: I tried this in my project. I added -fPIC to the COMPILE_FLAGS property of the object library and it worked, but then you also get PIC static

Re: [CMake] SHARED library containing OBJECT library: Missing -fPIC

2012-06-24 Thread Benjamin Eikel
Hello Leif, Am Freitag, 22. Juni 2012 um 15:55:55 schrieb Leif Walsh: I tried this in my project. I added -fPIC to the COMPILE_FLAGS property of the object library and it worked, but then you also get PIC static libraries (which isn't that big of a deal). But time your compiles. Usually the

[CMake] SHARED library containing OBJECT library: Missing -fPIC

2012-06-22 Thread Benjamin Eikel
Hello, I have a problem using an OBJECT library that I want to compile into a SHARED library using CMake version 2.8.8. Here is a small example that demonstrates my problem: # --- CMakeLists.txt --- cmake_minimum_required(VERSION 2.8.8) project(CMakeTest CXX)

Re: [CMake] SHARED library containing OBJECT library: Missing -fPIC

2012-06-22 Thread Andreas Naumann
Hello Benjamin, if you wants to use an object file for a shared library, this object file has to be compiled with -fPIC. I don't think, that it is possible to create a shared library from such object files. Regards, Andreas Am 22.06.2012 09:50, schrieb Benjamin Eikel: Hello, I have a

Re: [CMake] SHARED library containing OBJECT library: Missing -fPIC

2012-06-22 Thread Benjamin Eikel
Hello Andreas, Am Freitag, 22. Juni 2012, 11:09:36 schrieb Andreas Naumann: Hello Benjamin, if you wants to use an object file for a shared library, this object file has to be compiled with -fPIC. I don't think, that it is possible to create a shared library from such object files. I know

Re: [CMake] SHARED library containing OBJECT library: Missing -fPIC

2012-06-22 Thread Andreas Naumann
I think the latter is the case. It should not be allowed to compose a shared library from OBJECT libraries. What does the cmake developer think about this problem? Regards, Andreas Am 22.06.2012 11:14, schrieb Benjamin Eikel: Hello Andreas, Am Freitag, 22. Juni 2012, 11:09:36 schrieb Andreas

Re: [CMake] SHARED library containing OBJECT library: Missing -fPIC

2012-06-22 Thread Leif Walsh
I tried this in my project. I added -fPIC to the COMPILE_FLAGS property of the object library and it worked, but then you also get PIC static libraries (which isn't that big of a deal). But time your compiles. Usually the compilation of individual c files is well dominated by the linking time,