summaryrefslogtreecommitdiffstats
path: root/Modules/FortranCInterface.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-29 16:24:07 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-29 16:24:07 (GMT)
commit351ef7c187e0d29caef23db7add58bf214b42951 (patch)
tree3a0209ec31bf37a5798ddfa7b1bd975eeb7b90ca /Modules/FortranCInterface.cmake
parent4cb360afd25dd2967b3fc273e174e13ac11b4aeb (diff)
downloadCMake-351ef7c187e0d29caef23db7add58bf214b42951.zip
CMake-351ef7c187e0d29caef23db7add58bf214b42951.tar.gz
CMake-351ef7c187e0d29caef23db7add58bf214b42951.tar.bz2
ENH: only check for module linkage if f90 is available
Diffstat (limited to 'Modules/FortranCInterface.cmake')
-rw-r--r--Modules/FortranCInterface.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 23db5b6..a25e299 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