Skip to content
  • Marc Chevrier's avatar
    AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW · f254276f
    Marc Chevrier authored and Brad King's avatar Brad King committed
    The CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS setting has always been meant
    for flags needed to export symbols from executables for use by shared
    library plugins.  Since commit v3.4.0-rc1~58^2~1 (CMP0065: Restrict the
    use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS, 2015-08-24) this is made
    explicit by using the flags only for executables with ENABLE_EXPORTS,
    guarded by CMP0065 for compatibility.
    
    On some platforms we were accidentally using this setting to pass other
    flags to the linker:
    
    * AIX: -bnoipath, -brtl
    * HP-UX: +s, +nodefaultrpath
    
    These flags are incorrectly dropped when CMP0065 is set to NEW.  Fix
    this by moving the flags to more appropriate places for linking
    executables.
    f254276f