13 message(STATUS "Looking for bin f2c - found: ${F2C_EXE}")
15 message(STATUS "Looking for bin f2c - not found (http://www.netlib.org/f2c/)")
18 find_library(HAVE_F2C_LIB
32 message(STATUS "Looking for lib f2c - found: ${HAVE_F2C_LIB}")
34 message(STATUS "Looking for lib f2c - not found")
37 get_filename_component(F2C_HINT ${HAVE_F2C_LIB} PATH)
38 find_path(HAVE_F2C_H f2c.h
41 PATH_SUFFIXES include/
51 message(STATUS "Looking for f2c.h - found: ${HAVE_F2C_H}")
53 message(STATUS "Looking for f2c.h - not found")
57 set(HAVE_SMPI_F2C_H 1)
60 mark_as_advanced(HAVE_F2C_H)
61 mark_as_advanced(F2C_EXE)
62 mark_as_advanced(HAVE_F2C_LIB)
65 get_filename_component(F2C_LIBRARY_PATH "${HAVE_F2C_LIB}" PATH)
66 file(TO_NATIVE_PATH "${F2C_LIBRARY_PATH}" F2C_LIBRARY_PATH)
69 #Some old versions of 64 bits systems seem to have a different size between C and Fortran Datatypes
70 #Deactivate F2C with these versions, in order to avoid breaking test cases in legacy systems (as Fedora 13)
72 if(PROCESSOR_x86_64 AND "${CMAKE_SYSTEM}" MATCHES "Linux" AND ${CMAKE_C_COMPILER_ID} STREQUAL "GNU" AND "4.5" STRGREATER "${COMPILER_C_VERSION_MAJOR_MINOR}" )
74 message("Your C compiler is a bit old and Fortran support is quite problematic on 64 bit platforms, F2C has been deactivated")
78 if(HAVE_F2C_H AND F2C_EXE AND HAVE_F2C_LIB AND COMPILER_OK)
83 include_directories(${HAVE_F2C_H})
85 message("-- Fortran 77 support for smpi is disabled.")