Skip Fortran unittests if no Fortran MPI support is found

This commit is contained in:
Axel Kohlmeyer
2022-05-18 07:16:16 -04:00
parent d54f97736e
commit 6475d4b956

View File

@ -10,6 +10,11 @@ if(NOT CMAKE_Fortran_COMPILER_ID)
message(STATUS "Skipping Tests for the LAMMPS Fortran Module: cannot identify Fortran compiler")
return()
endif()
find_package(MPI QUIET)
if(BUILD_MPI AND NOT MPI_Fortran)
message(STATUS "Skipping Tests for the LAMMPS Fortran Module: no MPI support for Fortran")
return()
endif()
if(CMAKE_Fortran_COMPILER)
enable_language(C)