[cmake-developers] per-target-type/per-language flags (was: Adding logic to CMake for -fPIE and -fPIC)
Brad King
brad.king at kitware.com
Mon May 28 10:04:46 EDT 2012
On 05/25/2012 05:21 PM, Stephen Kelly wrote:
> 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?
There is already "CMAKE_SHARED_LINKER_FLAGS", though it is not
per-language. Note that CMAKE_SHARED_LIBRARY_C_FLAGS was never
documented a s publicly settable variable AFAIK. There is no
first-class interface to set per-language, per-target-type flags.
We could consider adding one, but that is a separate change.
I'll respond elsewhere in the original thread with a review of
the PIC topic.
-Brad
More information about the cmake-developers
mailing list