MantisBT - CMake
View Issue Details
0014358CMakeModulespublic2013-08-14 18:142014-02-10 10:44
Michel Zou 
Brad King 
normalminoralways
closedfixed 
CMake 2.8.11.2 
CMake 3.0CMake 3.0 
0014358: FortranCInterface fails to find generated test program when cross-compiling
Here is the initial bugreport on the mailing list left with no reply:
http://www.cmake.org/pipermail/cmake/2012-March/049459.html [^]
Use the FortranCInterface module AND use a fortran cross compiler:

in CMakeLists:
include ( FortranCInterface )
FortranCInterface_HEADER ( FortranCInterface.h )

in foo.h:
#include "FortranCInterface.h"
#define F77_FUNC(name,NAME) FortranCInterface_GLOBAL(name,NAME)
#define BAR_F77 F77_FUNC(bar,BAR)
void BAR_F77(int *x);

...
See the attached patch proposed in the thread against current master.
Tested with and without cross-compilation on Linux.

No tags attached.
patch cmake-fortrancinterface-cross-compilation.patch (575) 2013-08-14 18:14
https://public.kitware.com/Bug/file/4851/cmake-fortrancinterface-cross-compilation.patch
Issue History
2013-08-14 18:14Michel ZouNew Issue
2013-08-14 18:14Michel ZouFile Added: cmake-fortrancinterface-cross-compilation.patch
2013-08-15 08:06Brad KingNote Added: 0033720
2013-08-15 08:06Brad KingAssigned To => Brad King
2013-08-15 08:06Brad KingStatusnew => resolved
2013-08-15 08:06Brad KingResolutionopen => fixed
2013-08-15 08:06Brad KingFixed in Version => CMake 3.0
2013-08-15 08:06Brad KingTarget Version => CMake 3.0
2014-02-10 10:44Robert MaynardNote Added: 0035074
2014-02-10 10:44Robert MaynardStatusresolved => closed

Notes
(0033720)
Brad King   
2013-08-15 08:06   
Applied, thanks:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7a65a2f [^]
(0035074)
Robert Maynard   
2014-02-10 10:44   
Closing resolved issues that have not been updated in more than 4 months.