Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Give smpiff the directory to libf2c.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 8 Nov 2013 22:04:03 +0000 (23:04 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 8 Nov 2013 22:44:54 +0000 (23:44 +0100)
(cherry picked from commit 1848d40fafafab07f8c798116d5c507065f4c97b)

buildtools/Cmake/Modules/FindF2c.cmake
src/smpi/smpiff.in

index c370251..611e765 100644 (file)
@@ -63,6 +63,11 @@ mark_as_advanced(HAVE_F2C_H)
 mark_as_advanced(F2C_EXE)
 mark_as_advanced(HAVE_F2C_LIB)
 
 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)
 #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)
index b5c10f0..33093fc 100644 (file)
@@ -2,7 +2,7 @@
 prefix="@exec_prefix@"
 
 ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg"
 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
 declare -a SRCFILES
 
 # $1: prefix, $2: suffix