Re: [CMake] Issue with Fortran/C binding with Intel compilers

2016-11-17 Thread Michael Jackson
Just to add my 2 cents to this. This past year a collaborator of mine updated his F95 code to F2003 and the ISO_C_BINDING syntax and this made the interaction between our C/C++ codes and their Fortran codes extremely easy. No more macros to try to figure out. It oddly, just seems to work. Well

Re: [CMake] Issue with Fortran/C binding with Intel compilers

2016-11-17 Thread Joachim Pouderoux
Alan, Thanks for the advice, I think you are absolutely right, we should update to Fortran2003 to allow use of iso_c_binding module. Anyway I have actually been able to make CMake FortranCInterface work using a more recent version of CMake. Best, Joachim *Joachim Pouderoux*, PhD *Technical

Re: [CMake] Issue with Fortran/C binding with Intel compilers

2016-11-17 Thread Alan W. Irwin
On 2016-11-17 11:12-0400 Joachim Pouderoux wrote: Unfortunately I can't (Fortran95 only), that's why CMake feature is important. Hi Joachim: I have helped convert two projects (PLplot and the ephcom subproject of timeephem) recently to use the iso_c_binding module provided by Fortran 2003,

Re: [CMake] Issue with Fortran/C binding with Intel compilers

2016-11-17 Thread Joachim Pouderoux
Unfortunately I can't (Fortran95 only), that's why CMake feature is important. Joachim *Joachim Pouderoux*, PhD *Technical Expert - Scientific Computing Team* *Kitware SAS * 2016-11-17 10:48 GMT-04:00 Elizabeth A. Fischer < elizabeth.fisc...@columbia.edu>: > Can you

Re: [CMake] Issue with Fortran/C binding with Intel compilers

2016-11-17 Thread Elizabeth A. Fischer
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 <

[CMake] Issue with Fortran/C binding with Intel compilers

2016-11-17 Thread Joachim Pouderoux
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