From 433246799eb9913ddb7d902cc1147a39215ee60a Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 7 Nov 2013 22:15:10 +0100 Subject: [PATCH] Support for F90 also needs f2c. --- buildtools/Cmake/CompleteInFiles.cmake | 2 +- buildtools/Cmake/Modules/FindGFortran.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 21f068fc00..16aff5cbd4 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -217,9 +217,9 @@ else() SET(MMALLOC_WANT_OVERRIDE_LEGACY 0) endif() -# must come after having set HAVE_MC (FindGFortran uses it) if(enable_smpi) include(FindF2c) + # FindGFortran must come after FindF2C, and after having set HAVE_MC include(FindGFortran) SET(HAVE_SMPI 1) endif() diff --git a/buildtools/Cmake/Modules/FindGFortran.cmake b/buildtools/Cmake/Modules/FindGFortran.cmake index b15409e561..f034577fc5 100644 --- a/buildtools/Cmake/Modules/FindGFortran.cmake +++ b/buildtools/Cmake/Modules/FindGFortran.cmake @@ -20,7 +20,9 @@ endif() set(SMPI_F90 0) if(GFORTRAN_EXE) - if(HAVE_MC) + if(NOT SMPI_F2C) + message("-- Fortran 90 support for smpi also needs f2c.") + elseif(HAVE_MC) message("-- Fortran 90 support for smpi is currently not compatible with model checking.") else() set(SMPI_F90 1) -- 2.20.1