From 1848d40fafafab07f8c798116d5c507065f4c97b Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 8 Nov 2013 23:04:03 +0100 Subject: [PATCH] Give smpiff the directory to libf2c. --- buildtools/Cmake/Modules/FindF2c.cmake | 5 +++++ src/smpi/smpiff.in | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/buildtools/Cmake/Modules/FindF2c.cmake b/buildtools/Cmake/Modules/FindF2c.cmake index c370251045..611e7655d0 100644 --- a/buildtools/Cmake/Modules/FindF2c.cmake +++ b/buildtools/Cmake/Modules/FindF2c.cmake @@ -63,6 +63,11 @@ mark_as_advanced(HAVE_F2C_H) mark_as_advanced(F2C_EXE) mark_as_advanced(HAVE_F2C_LIB) +if(HAVE_F2C_LIB) + get_filename_component(F2C_LIBRARY_PATH "${HAVE_F2C_LIB}" PATH) + file(TO_NATIVE_PATH "${F2C_LIBRARY_PATH}" F2C_LIBRARY_PATH) +endif() + #Some old versions of 64 bits systems seem to have a different size between C and Fortran Datatypes #Deactivate F2C with these versions, in order to avoid breaking test cases in legacy systems (as Fedora 13) set(COMPILER_OK 1) diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index b5c10f0e55..33093fcca0 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -2,7 +2,7 @@ prefix="@exec_prefix@" ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg" -LINKARGS="-lf2c -lm" +LINKARGS="-L@F2C_LIBRARY_PATH@ -lf2c -lm" declare -a SRCFILES # $1: prefix, $2: suffix -- 2.20.1