Skip to content

FindMPI: Fix libname regex to not match the compiler executable

Chuck Atkins requested to merge chuck.atkins/cmake:fix-findmpi-lib-regex into master

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.

Edited by Kitware Robot

Merge request reports