This extends the Fortran-to-C interface test to add a C++ source file. The executable can only link with the C++ linker and with the proper Fortran runtime libraries. These libraries should be detected by CMake automatically, so this tests verifies the detection functionality.
12 lines
150 B
C
12 lines
150 B
C
#include "foo.h"
|
|
extern F_test_mod_sub();
|
|
extern F_mysub();
|
|
int foo()
|
|
{
|
|
F_mysub();
|
|
F_my_sub();
|
|
#ifdef F_test_mod_sub
|
|
F_test_mod_sub();
|
|
#endif
|
|
}
|