From: navarrop Date: Tue, 30 Nov 2010 13:46:12 +0000 (+0000) Subject: Remove error if not having f2c. X-Git-Tag: v3_5~75 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/233c22349336937a5ddfef86eddcbe3bb78bb801 Remove error if not having f2c. 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 --- diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 7a8ae342f7..6f04bc5eaa 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -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 index 0000000000..b8d3ccdf84 --- /dev/null +++ b/include/smpi/smpif.h.in @@ -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 +#endif + +#include + +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