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

Joachim Pouderoux joachim.pouderoux at kitware.com
Thu Nov 17 10:12:02 EST 2016


Unfortunately I can't (Fortran95 only), that's why CMake feature is
important.

Joachim

*Joachim Pouderoux*, PhD

*Technical Expert - Scientific Computing Team*
*Kitware SAS <http://www.kitware.fr>*


2016-11-17 10:48 GMT-04:00 Elizabeth A. Fischer <
elizabeth.fischer at columbia.edu>:

> 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.pouderoux at 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161117/c4db2380/attachment.html>


More information about the CMake mailing list