From 351ef7c187e0d29caef23db7add58bf214b42951 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 29 Oct 2008 12:24:07 -0400 Subject: [PATCH] ENH: only check for module linkage if f90 is available --- Modules/FortranCInterface.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake index 23db5b607..a25e2990d 100644 --- a/Modules/FortranCInterface.cmake +++ b/Modules/FortranCInterface.cmake @@ -169,7 +169,10 @@ function(create_fortran_c_interface NAMESPACE FUNCTIONS HEADER) set(prefix ) set(suffix ) set(found FALSE) - discover_fortran_module_mangling(prefix suffix found) + # only try this if the compiler is F90 compatible + if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) + discover_fortran_module_mangling(prefix suffix found) + endif(CMAKE_Fortran_COMPILER_SUPPORTS_F90) if(found) message(STATUS "found Fortran module linkage") set(FORTRAN_C_MODULE_PREFIX "${prefix}" CACHE INTERNAL