From 7f6eb8fd886d3a99223e3bad11f12698d6c89052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Sun, 5 Apr 2015 11:04:43 +0100 Subject: [PATCH] [CMake] Adjust Fortran check to how Eigen does it. We got the workaround_9220 code from Eigen. Now we use the code as the Eigen project does, see for example their file lapack/CMakeLists.txt. This fixes the Fortran detection with Visual Studio 2015 CTP 6. --- cmake/modules/DuneMacros.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake index b5edd210b..be2106a4e 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) -- GitLab