diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b3e1a88779..89a4a60e12 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -37,7 +37,7 @@ endif() set(MPI_ENABLED FALSE) set(HDF5_ENABLED FALSE) -if($ENV{FC} MATCHES "mpi.*") +if($ENV{FC} MATCHES "mpi[^/]*$") message("-- Detected MPI wrapper: $ENV{FC}") add_definitions(-DMPI) set(MPI_ENABLED TRUE)