Can you use the Fortran/C interop that is now an ISO standard for Fortran 2003 and beyond? That should eliminate the issues you're facing here.
https://gcc.gnu.org/onlinedocs/gfortran/Interoperability-with-C.html On Thu, Nov 17, 2016 at 8:50 AM, Joachim Pouderoux < joachim.pouder...@kitware.com> wrote: > Hi, > > I am using something like this in my CMake script: > enable_language(Fortran) > include(FortranCInterface) > FortranCInterface_VERIFY() > FortranCInterface_HEADER(${CMAKE_CURRENT_BINARY_DIR}/FortranBinding.h > MACRO_NAMESPACE "FC_" > SYMBOL_NAMESPACE "FC_") > > So far, with gfortran/gcc/clang, I never had any issues and the generated > FortranBinding.h is correct, defining FC_GLOBAL, FC_GLOBAL_, FC_MODULE and > FC_MODULE_ macros. > However, I am facing issues with Intel compilers (icc+ifort) (I am using > v17.0.0), VERIFY macro claims that it is OK but then, the FortranBinding.h > header is empty (only the #ifndef,#define,#endif stuff), no macro > definition. > Any idea? > > Thanks! > Best, > > *Joachim Pouderoux*, PhD > > *Technical Expert - Scientific Computing Team* > *Kitware SAS <http://www.kitware.fr>* > > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake