skip testing the fortran module if CMake cannot identify the fortran compiler

this avoids compilation failure with the new llvm based flang (aka f18)
This commit is contained in:
Axel Kohlmeyer 2021-06-21 17:25:29 -04:00
parent ae86364402
commit 95f713bd38
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,11 @@ endif()
include(CheckLanguage)
check_language(Fortran)
if(NOT CMAKE_Fortran_COMPILER_ID)
message(STATUS "Skipping Tests for the LAMMPS Fortran Module: cannot identify Fortran compiler")
return()
endif()
if(CMAKE_Fortran_COMPILER)
enable_language(C)
enable_language(Fortran)