[CMake] FortranCInterface not working with 3.9.0 with Intel 2015
JR Cary
cary at txcorp.com
Sun Nov 26 18:29:05 EST 2017
Works with 3.8.2.
Compilers specified by
-DCMAKE_C_COMPILER:FILEPATH='C:/Program Files (x86)/Intel/Composer XE
2015/bin/intel64/icl.exe' -DCMAKE_CXX_COMPILER:FILEPATH='C:/Program
Files (x86)/Intel/Composer XE 2015/bin/intel64/icl.exe'
-DCMAKE_Fortran_COMPILER:FILEPATH='C:/Program Files (x86)/Intel/Composer
XE 2015/bin/intel64/ifort.exe'
The cmake code is
include(FortranCInterface)
FortranCInterface_HEADER(
${CMAKE_BINARY_DIR}/FCMangle.h
MACRO_NAMESPACE "FC_"
SYMBOL_NAMESPACE "FC_"
SYMBOLS mysub mymod:my_sub
)
The relevant output is
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Failed to compile
CMake Warning (dev) at
C:/winsame/cary/usim/contrib-icl15/cmake-3.9.0-ser/share/
cmake-3.9/Modules/FortranCInterface.cmake:309 (message):
No FortranCInterface mangling known for mysub
Call Stack (most recent call first):
scimake/SciFortranChecks.cmake:269 (FortranCInterface_HEADER)
scimake/SciInit.cmake:232 (include)
CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at
C:/winsame/cary/usim/contrib-icl15/cmake-3.9.0-ser/share/
cmake-3.9/Modules/FortranCInterface.cmake:295 (message):
No FortranCInterface mangling known for mymod:my_sub
Call Stack (most recent call first):
scimake/SciFortranChecks.cmake:269 (FortranCInterface_HEADER)
scimake/SciInit.cmake:232 (include)
CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
The resulting file is
$ cat FCMangle.h
#ifndef FC_HEADER_INCLUDED
#define FC_HEADER_INCLUDED
/*--------------------------------------------------------------------------*/
/* Mangle some symbols
automatically. */
#endif
Any help appreciated..........John Cary
More information about the CMake
mailing list