diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Fortran/CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index bb07c16..229181b 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -11,8 +11,19 @@ ADD_EXECUTABLE(testf hello.f) # test the C to Fortran interface module include(FortranCInterface) if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) - set(srcs foo.f) - set(FORTRAN_FUNCTIONS test_mod:sub) + if(FORTRAN_C_MODULE_MANGLING_FOUND) + 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() set(FORTRAN_FUNCTIONS ${FORTRAN_FUNCTIONS} my_sub mysub ) set(srcs ${srcs} mysub.f foo.c) |