diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake index b5edd210bd867d213000a606bcf6e8c90a632ecd..be2106a4edd4651c2c4c51dbd5b9672c5c4ab314 100644 --- a/cmake/modules/DuneMacros.cmake +++ b/cmake/modules/DuneMacros.cmake @@ -569,6 +569,9 @@ macro(dune_project) workaround_9220(Fortran Fortran_Works) if(Fortran_Works) enable_language(Fortran OPTIONAL) + if(NOT CMAKE_Fortran_COMPILER) + set(Fortran_Works OFF) + endif() endif(Fortran_Works) option(DUNE_USE_ONLY_STATIC_LIBS "If set to ON, we will force static linkage everywhere" OFF)