summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-31 20:08:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-31 20:08:56 (GMT)
commitcecc2ab2903485d7389e6dedf1991eeb454665d5 (patch)
tree0b2b4f91916cedb266cd21d15fc8545fbf09b7b8 /Tests
parenta8b17d9e9aaa12e559904d7c4f5e0554de0e45c8 (diff)
downloadCMake-cecc2ab2903485d7389e6dedf1991eeb454665d5.zip
CMake-cecc2ab2903485d7389e6dedf1991eeb454665d5.tar.gz
CMake-cecc2ab2903485d7389e6dedf1991eeb454665d5.tar.bz2
ENH: do not error when sunpro or mipspro fortran used
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Fortran/CMakeLists.txt15
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)