1. 21 Aug, 2019 1 commit
  2. 25 Jul, 2019 1 commit
    • Robert Maynard's avatar
      FindMPI: make sure computed link flags are not de-duplicated · cf04da7e
      Robert Maynard authored
      In commit f7eaa342 (FindMPI: Store imported target link flags as a
      list instead of a string, 2019-06-14, v3.15.0-rc2~2^2) we used
      `separate_arguments` to parse the extracted link flags and add them to
      `INTERFACE_LINK_LIBRARIES`.  That property is not meant for link flags
      and CMake may de-duplicate them.  This is particularly problematic for
      flags like `-Wl,-rpath -Wl,/path1 -Wl,-rpath -Wl,/path2`.
      
      In commit 39c572c9 (FindMPI: Updated to use INTERFACE_LINK_OPTIONS,
      2019-06-24) we moved the parsed flags over to `INTERFACE_LINK_OPTIONS`,
      but that may still perform de-duplication.  Avoid the parsing and
      de-duplication of flags by passing the original string via `SHELL:`
      instead.
      
      Fixes: #19516
      cf04da7e
  3. 29 Jun, 2019 1 commit
  4. 24 Jun, 2019 1 commit
  5. 19 Jun, 2019 1 commit
  6. 06 May, 2019 2 commits
  7. 20 Apr, 2019 1 commit
    • Christian Pfeiffer's avatar
      FindMPI: Don't retain libdirs for Win32 · 7db32efb
      Christian Pfeiffer authored
      On Windows systems, the need to retain library directories should not
      nomrally occur. This can only occur on Unix like systems where a shared
      library is being linked that has a dependency on another library which
      is not being found in the default directories (e.g. libgfortran on BSD)
      
      This also works around an issue introduced by !1694 in that the Visual
      Studio generator does not handle link flags passed in
      `INTERFACE_LINK_LIBRARIES` correctly, causing problems when using that
      generator with Intel MPI in certain circumstances.
      7db32efb
  8. 25 Oct, 2018 1 commit
  9. 22 Oct, 2018 1 commit
  10. 10 Sep, 2018 1 commit
    • Brad King's avatar
      FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS as a command-line string · e374b9f1
      Brad King authored
      Refactoring in commit v3.10.0-rc1~103^2~2 (FindMPI: Modernization from
      ground up, 2017-04-25) accidentally left this variable set as a copy of
      the `;`-list in `MPI_<LANG>_COMPILE_OPTIONS`, but the flags variable is
      documented as a command-line string.  Restore it now.
      
      Fixes: #18349
      e374b9f1
  11. 12 Apr, 2018 1 commit
    • Chuck Atkins's avatar
      FindMPI: Fix libname regex to not match the compiler executable · bab4bc5f
      Chuck Atkins authored
      When trying to match full path libraries on the mpicc link line, the
      current regex is not strict enough and improperly matches a partial path
      to the Xcode compiler path with homebrew mpich.  This adjusts the regex
      to look for a space preceeding the library name to prevent the first
      argument, i.e. the compiler invocation, from being matched, and require
      either a space or end-pattern after the library to prevent mismatches with
      arguments that contain the library suffix but don't actually end with it.
      bab4bc5f
  12. 31 Jan, 2018 3 commits
  13. 30 Jan, 2018 2 commits
    • Christian Pfeiffer's avatar
      FindMPI: Retain unused link paths · e7c0298d
      Christian Pfeiffer authored
      If our ``find_library`` step hasn't used a particular link directory at
      all, it's best to retain it in order to prevent issues from secondary
      dependencies not being found.
      e7c0298d
    • Christian Pfeiffer's avatar
      FindMPI: Use more CMake variables · 8cddc899
      Christian Pfeiffer authored
      This replaces hardcoded expectations of flags like -l and -L with a
      dynamical solution based on CMake platform variables.
      
      Furthermore, the linker flag parsing is dynamified to support more forms
      and given linker paths are now removed properly from the linker flags.
      8cddc899
  14. 25 Jan, 2018 1 commit
    • Christian Pfeiffer's avatar
      FindMPI: Improve link information parsing · 8b79107a
      Christian Pfeiffer authored
      The parsing of link information coming from the compiler wrapper has been improved:
      
      - Support MSVC /link argument separation properly and add support for potential VC++ link flags
      - Rely on the global import/static/shared library suffixes instead of hardcoded special values.
      This should improve compatibility with Cygwin and MinGW should any MPI implementation there need this behavior.
      - Don't use ``find_library`` if the full path of a library is known anyways.
      8b79107a
  15. 10 Jan, 2018 1 commit
    • Christian Pfeiffer's avatar
      FindMPI: Move MSMPI/MPICH2 mpiexec search · 5e9512a3
      Christian Pfeiffer authored
      Move the logic to search mpiexec for MSMPI and MPICH2 guesses to their
      respective guessing logic. This way, we can prevent mix ups between
      their mpiexecs and other potential matches, for example from an Intel
      MPI installation.
      5e9512a3
  16. 12 Dec, 2017 1 commit
    • Christian Pfeiffer's avatar
      FindMPI: Fix various legacy problems · d1d8719f
      Christian Pfeiffer authored
      This MR fixes a number of bugs stemming from legacy variable handling,
      partially introduced by commit v3.10.0-rc1~103^2 (FindMPI: Add support
      for FreeBSD and SLES, 2017-08-09).
      
      * `MPI_COMPILE_OPTIONS` and `MPI_COMPILE_DEFINITIONS` legacy hints were not passed correctly.
      * Legacy variables could be parsed after they were set by `FindMPI` cause erroneous hinting on subsequent runs.
      * In the case of the compiler supporting MPI implicitly:
      	* not all consumption variables would be correctly reset.
      	* `MPI_<LANG>_HEADER_DIR` would be set unintentionally.
      	* `MPI_<LANG>_LIB_NAMES` appeared in cache despite being ignored.
      	* on subsequent passes, `MPI_<LANG>_COMPILER` could be corrupted.
      * the C-to-CXX copy logic would take place even if `MPI_SKIP_GUESSING` was turned on
      * if only some language compilers were given, inconsistent search behavior could be observed
      
      Issue: #17538
      d1d8719f
  17. 05 Dec, 2017 2 commits
    • Christian Pfeiffer's avatar
      FindMPI: Fix multiple configure runs · 2047eb36
      Christian Pfeiffer authored
      Due to a erroneous logical dependency on a temporary variable, FindMPI
      would depend its FOUND status on the set of flags needed to support
      compiler-implicit MPI support after the first configure run.
      
      This behavior is especially causing a misreported NOT FOUND status after
      the first run on MPI implementations without MPI compiler like MS-MPI or
      MPICH2 on Windows.
      2047eb36
    • Christian Pfeiffer's avatar
      FindMPI: Correct legacy variable handling · bde7513d
      Christian Pfeiffer authored
      Due to a minor logic error, MPI_LIBRARY, MPI_EXTRA_LIBRARY and
      MPI_<LANG>_LIBRARIES hints are currently not correctly handled and
      discarded.
      
      Additionally, if either C or CXX aren't enabled, there subsequent calls
      to FindMPI will cause cache variables of the sort "MPI_MPI_EXTRA_LIBRARY-NOTFOUND"
      to appear due to an error in the compatibility handling. (Doesn't affect
      functionality)
      bde7513d
  18. 15 Nov, 2017 1 commit
    • Christian Pfeiffer's avatar
      FindMPI: Treat 'command not found' as an error · 1615cded
      Christian Pfeiffer authored
      If the compiler given in I_MPI_... could not be found, the Intel MPI
      wrappers emit an error like "line 590: ifort: command not found".
      The script should currently fail to match the output of this for
      information, but we should generally treat such an output as invalid,
      since the displayed configuration line can become a mixup between Intel
      and GNU compiler settings.
      1615cded
  19. 24 Oct, 2017 1 commit
    • Christian Pfeiffer's avatar
      FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS · 1610f757
      Christian Pfeiffer authored
      Since commit v3.9.0-rc1~224^2~1 (FindMPI: MPIEXEC handling improvements,
      2017-04-21) the `ProcessorCount` module is being used to initialize
      `MPIEXEC_MAX_NUMPROCS`.  However, this leads to the logical cores being
      counted rather than the physical ones, and some MPI implementations like
      OpenMPI will error if mpiexec is called with that number.  Switch it to
      the number of physical cores using `cmake_host_system_information`.
      
      This ensures that if `MPIEXEC_MAX_NUMPROCS` is being used to set up MPI
      tests with CTest or similar that the tests won't spuriously fail due to
      OpenMPI refusing to start the application.
      1610f757
  20. 15 Sep, 2017 3 commits
    • Christian Pfeiffer's avatar
      FindMPI: Add support for FreeBSD and SLES · bf1e606f
      Christian Pfeiffer authored
      Fixes: #17117
      bf1e606f
    • Christian Pfeiffer's avatar
      2f673da6
    • Christian Pfeiffer's avatar
      FindMPI: Modernization from ground up · 9a58e69c
      Christian Pfeiffer authored
      This is a near-total rewrite of FindMPI implementing the following
      features:
      
      Environmental improvements:
      
      - C++ settings can now be picked from C settings if no dedicated C++
        settings are found (some installs of IBM Platform MPI)
      - Fortran settings can now be found on MPICH-1, MVAPICH-1, Microsoft
        MPI and MPICH-2 on Windows.
      
      - Improved flag procession logic: Flags related to security enhancements
        of MPI itself, and unrelated to MPI usage (-fstack-protector-strong on
        e.g. RHEL 7 for MPICH and MVAPICH) will be filtered out properly now.
        -pthread is now being handled. -fno-strict-aliasing, which may be needed
        while compiling MVAPICH (e.g. RHEL 7's MVAPICH package) is also
        filtered.
      
      Features added:
      
      - MPI version can be determined for each language and is exposed as the
        package version
      - MPI functionality is being tested to ensure the correctness of
        settings
      - MPI-2 C++ bindings can be suppressed if desired by the project or
        user. For older MPIs, this often resolves issues and eliminated the
        infamous SEEK_SET trouble.
      - MPI-2 C++ bindings are now being searched for and exposed by a
        variable if detected.
      - Fortran support now does not make assumptions over the MPI present and
        works with ILP64 MPI implementations.
      - Fortran now exposes which bindings (mpif.h, mpi/mpi_f08 modules) are
        available
      - MPI detection can now work hybridly, which for example permits using the
        Fortran modules shipped with some compiler suites together with MPI
        (e.g. PGI on Windows shipping MSMPI modules)
      - Ability to determine MPI library version (*requires* try_run, caution)
        upon request
      - Ability to determine Fortran capabilities from MPI-3 for each of the
        bindings (subarrays, asynchronous attribute protecting entities) (also
        requires try_run)
      
      Fine grained control over the search process:
      
      - Possibility to selectively enable and disable steps like compiler
        wrapper search and guessing. Permits picking Microsoft MPI over Intel
        MPI if both are loaded (previously not possible without removing the
        IMPI compiler wrappers from the environment)
      - Ability to pick MPICH2 over MSMPI (previously the first one located
        was taken)
      - A user may now pass compiler flags to the compiler wrapper script,
        enabling much more flexibility. This permits for example linking the
        Intel MPI debug runtime, static linking, ILP64 with Fortran,
        linking tracing, ...
      - A user may define a suffix for all MPI binaries that are being looked
        for (useful on Debian/Ubuntu where the alternative MPI installs are each
        appended with their name, e.g. mpicc.mpich and mpicc.lam)
      
      Cache variable improvements
      
      - Instead of the previous plural cache variables a list-of-variables
        approach is now in place. Permits correcting individual variables
        instead of having to wade through a list, also speeds up the search
        process and increases comfort by eliminating duplicate entries in
        LIBRARIES over languages
      - MPIEXEC was corrected to MPIEXEC_EXECUTABLE in order to fix the
        grouping in the CMake GUI for the variable (previously ungrouped)
      9a58e69c
  21. 26 Apr, 2017 1 commit
  22. 21 Apr, 2017 2 commits
  23. 15 Apr, 2017 2 commits
  24. 02 Feb, 2017 1 commit
  25. 01 Feb, 2017 1 commit
  26. 23 Jan, 2017 2 commits
  27. 28 Nov, 2016 1 commit
  28. 27 Sep, 2016 1 commit
    • Brad King's avatar
      Simplify CMake per-source license notices · 86578ecc
      Brad King authored
      Per-source copyright/license notice headers that spell out copyright holder
      names and years are hard to maintain and often out-of-date or plain wrong.
      Precise contributor information is already maintained automatically by the
      version control tool.  Ultimately it is the receiver of a file who is
      responsible for determining its licensing status, and per-source notices are
      merely a convenience.  Therefore it is simpler and more accurate for
      each source to have a generic notice of the license name and references to
      more detailed information on copyright holders and full license terms.
      
      Our `Copyright.txt` file now contains a list of Contributors whose names
      appeared source-level copyright notices.  It also references version control
      history for more precise information.  Therefore we no longer need to spell
      out the list of Contributors in each source file notice.
      
      Replace CMake per-source copyright/license notice headers with a short
      description of the license and links to `Copyright.txt` and online information
      available from "https://cmake.org/licensing".  The online URL also handles
      cases of modules being copied out of our source into other projects, so we
      can drop our notices about replacing links with full license text.
      
      Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
      of the replacements mechanically.  Manually fix up shebang lines and trailing
      newlines in a few files.  Manually update the notices in a few files that the
      script does not handle.
      86578ecc
  29. 27 Jul, 2016 1 commit
    • Daniel Pfeifer's avatar
      Use string(APPEND) in Modules · 5d0d980d
      Daniel Pfeifer authored
      Automate with:
      
      find Modules -type f -print0 | xargs -0 perl -i -0pe \
      's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
      5d0d980d
  30. 15 Apr, 2016 1 commit