[cmake-developers] [CMake][PATCH] AIX RPATH handling

Brad King brad.king at kitware.com
Wed Dec 9 09:15:19 EST 2015


On 12/09/2015 09:09 AM, CHEVRIER, Marc wrote:
> You are right. I missed this capability.
> My first idea was to apply to exec the same approach as for shared lib but I didn’t found appropriate variable: something like CMAKE_EXE_CREATE_<LANG>_FLAGS
> Or may be CMAKE_EXE_LINKER_FLAGS_INIT can be used but I am not sure of the usage of the *_INIT variables.

Actually the old code has it in two places:

> - set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared
> - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib

The CREATE_ value is used when linking a shared library itself.
The LINK_ value is used to link executables.  Both should already
be getting the flag with no changes.

-Brad



More information about the cmake-developers mailing list