Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove error if not having f2c.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 30 Nov 2010 13:46:12 +0000 (13:46 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 30 Nov 2010 13:46:12 +0000 (13:46 +0000)
Configure the smpif.h.in file for variable HAVE_SMPI_F2C_H.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8756 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/CompleteInFiles.cmake
include/smpi/smpif.h.in [new file with mode: 0644]

index 7a8ae34..6f04bc5 100644 (file)
@@ -149,9 +149,7 @@ if(enable_smpi)
                        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${HAVE_F2C_H} ")
           endif(NOT operation)
        else(HAVE_F2C_H)
-               message("-- Smpi Need \"f2c.h\".")
-               message("-- Please install f2c before use smpi or set LD_LIBRARY_PATH to \"f2c.h\".")
-               message(FATAL_ERROR "SMPI DEPENDENCIES")
+               message("-- You should install f2c before use smpi.")
        endif(HAVE_F2C_H)       
 endif(enable_smpi)
 
@@ -758,6 +756,7 @@ set(libdir ${exec_prefix}/lib)
 set(CMAKE_LINKARGS "${CMAKE_CURRENT_BINARY_DIR}/lib")
 set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/lib:${gtnets_path}/lib:$LD_LIBRARY_PATH")
 
+configure_file(${PROJECT_DIRECTORY}/include/smpi/smpif.h.in ${PROJECT_DIRECTORY}/include/smpi/smpif.h @ONLY)
 configure_file(${PROJECT_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${PROJECT_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpif2c @ONLY)
 configure_file(${PROJECT_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpiff @ONLY)
diff --git a/include/smpi/smpif.h.in b/include/smpi/smpif.h.in
new file mode 100644 (file)
index 0000000..b8d3ccd
--- /dev/null
@@ -0,0 +1,25 @@
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SMPIF_H
+#define SMPIF_H
+
+#cmakedefine HAVE_SMPI_F2C_H @HAVE_SMPI_F2C_H@
+
+#ifdef HAVE_SMPI_F2C_H
+       #undef min //Need because first def in xbt.h
+       #undef max //Need because first def in xbt.h
+       #include <f2c.h>
+#endif
+
+#include <xbt/misc.h>
+
+XBT_PUBLIC(int) smpi_process_argc(void);
+XBT_PUBLIC(int) smpi_process_getarg(integer* index, char* dst, ftnlen len);
+XBT_PUBLIC(int) smpi_global_rank(void);
+XBT_PUBLIC(int) smpi_global_size(void);
+
+#endif