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)
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)
--- /dev/null
+/* 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