Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable install test on macOS + Fortran + MPI #1852

Commits on Nov 1, 2019

  1. Disable install test on macOS + Fortran + MPI

    mpifort adds a -Wl,-flat_namespace flag, which, in conjunction with
    an ugly Xcode bug (http://www.openradar.me/25313838), prohibits the
    use of rpaths to locate the libraries. Therefore, in commit a80afca,
    the configure-time value of ${CMAKE_INSTALL_PREFIX} was used as the
    install name directory instead of @rpath, and CMAKE_MACOSX_RPATH was
    also set to OFF if macOS + Fortran + MPI was detected.
    
    Unfortunately, the install test changes ${CMAKE_INSTALL_PREFIX} at
    install time, which results in the test failing due to the executable
    searching in the wrong directory for the libraries. It may be possible
    to dynamically set the correct install name directory at install time,
    using some combination of install(SCRIPT), file(GENERATE), and
    install_name_tool. However, for the sake of simplicity, we have chosen
    to simply disable the test under these circumstances.
    
    Disable the install test if macOS + Fortran + MPI is detected. Enable
    it otherwise. In addition, allow rpath to work if this combination is
    not detected, by not setting CMAKE_INSTALL_NAME_DIR and setting
    CMAKE_INSTALL_RPATH to @loader_path, which is the macOS equivalent of
    Linux's ${ORIGIN}.
    KyleFromKitware committed Nov 1, 2019
    Configuration menu
    Copy the full SHA
    658ac23 View commit details
    Browse the repository at this point in the history