Brad King wrote:
> On 05/25/2012 04:47 PM, Stephen Kelly wrote:
>> I've re-pushed to my gitorious clone.
>
> Thanks. I'll review when I get a chance.
>
Something else that occured to me was that there's no way currently in the
branch to use both POSITION_INDEPENDENT_CODE and set FLAGS for all
SHARED_LIBRARYs and set the policy to NEW.
Should a CMAKE_${TARGET_TYPE}_${LANG}_COMPILE_OPTIONS be added in this
branch too?
>>> AddPositionIndependentFlags shouldn't care whether the library is
>>> shared or not, right?
>>
>> My vague understanding up to now has been that static libraries should
>> not get the flag
>
> It should be up to the project. I might create some static libs
> as dependencies of a shared lib. When linking the shared lib it
> will bring in the objects from the static libs so they should have
> been built with -fPIC. If I set POSITION_INDEPENDENT_CODE on a
> target I expect to get -fPI{C,E} no matter the target type.
Right.
Thanks,
Steve.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers