ENH: do not error when sunpro or mipspro fortran used

This commit is contained in:
Bill Hoffman 2008-10-31 16:08:56 -04:00
parent a8b17d9e9a
commit cecc2ab290
1 changed files with 13 additions and 2 deletions

View File

@ -11,8 +11,19 @@ ADD_EXECUTABLE(testf hello.f)
# test the C to Fortran interface module # test the C to Fortran interface module
include(FortranCInterface) include(FortranCInterface)
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
set(srcs foo.f) if(FORTRAN_C_MODULE_MANGLING_FOUND)
set(FORTRAN_FUNCTIONS test_mod:sub) set(srcs foo.f)
set(FORTRAN_FUNCTIONS test_mod:sub)
else(FORTRAN_C_MODULE_MANGLING_FOUND)
if(CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|MIPSpro")
message("SunPro and MPISpro compilers do not support"
" linking Fortran module procedures from C")
else()
message("This will fail, but let the user see the error")
set(srcs foo.f)
set(FORTRAN_FUNCTIONS test_mod:sub)
endif()
endif(FORTRAN_C_MODULE_MANGLING_FOUND)
endif() endif()
set(FORTRAN_FUNCTIONS ${FORTRAN_FUNCTIONS} my_sub mysub ) set(FORTRAN_FUNCTIONS ${FORTRAN_FUNCTIONS} my_sub mysub )
set(srcs ${srcs} mysub.f foo.c) set(srcs ${srcs} mysub.f foo.c)