Skip to content
Snippets Groups Projects
Commit fb2b3a6f authored by Alexey Matveichev's avatar Alexey Matveichev Committed by Mark OLESEN
Browse files

COMP: add rpath information to MacOS compilation rules (#2948)

- Since the Apple SIP (System Integrity Protection) clears environment
  variables such as DYLD_LIBRARY_PATH env variable, a number of
  workarounds have been used to provide shadow values.

  However, for a more robust installation using the -rpath at
  compilation time appears to be the best solution.

  Add MacOS-specific rpath handling (@loader_path, @executable_path)
  to the wmake rules.

  Library paths handled:
    - FOAM_USER_LIBBIN
    - FOAM_SITE_LIBBIN
    - FOAM_FOAM_EXT_LIBBIN, FOAM_EXT_LIBBIN/FOAM_MPI
    - FOAM_LIBBIN (implicitly)

  The executable rpaths are handled assuming a structure of
     install-path/bin
     install-path/lib

- no rpath added for c-only compilations since there are currently
  no c-only libraries or executables with dynamic loading

  The current default for MacOS is the link with rpath information.
  This can be disabled by including `~rpath` in the WM_COMPILE_CONTROL
parent 779c3fe1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment