[CMake] compiling for static/shared simultaneously?

Philip Lowman philip at yhbt.com
Tue Mar 20 18:41:19 EST 2007


Eric Noulard wrote:
> 2007/3/19, Philip Lowman <philip at yhbt.com>:
>> I noticed when using ADD_LIBRARY to compile both static and shared
>> simultaneously that CMake will compile the source code twice once with
>> -fPIC (for shared build) and once without.
> [...]
>>
>> Is this even possible to do within CMakeLists.txt files without making
>> source code modifications?
>>
> 
> You should browse ML archive for this subject:
> 
> http://www.cmake.org/pipermail/cmake/2007-March/013052.html
> 
> http://www.cmake.org/pipermail/cmake/2007-March/013143.html

Fair enough, thanks.  I'm think I read part of one of those threads but 
missed the ending bit.  :(

> And the FAQ too:
> http://www.cmake.org/Wiki/CMake_FAQ#Library_questions

Is the part about the convenience libraries discussing this problem?  It 
kind of sounds like it based on reading it now but when I read it a few 
days ago I had no idea what the author was talking about.

-- 
Philip Lowman
Simulation Development Engineer, Modeling and Simulation Technology
General Dynamics Land Systems
http://www.gdls.com


More information about the CMake mailing list