diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-18 17:39:51 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-19 18:18:39 +0200 |
| commit | 72865a2773a2beb4ea570ecbd7d334866099130f (patch) | |
| tree | c40687d56d4c55ce71ea9d9dd20827f780df31ba /test cases/fortran | |
| parent | 79f7328d6a010e56c28eb9442b61931cf13b04e6 (diff) | |
| download | meson-72865a2773a2beb4ea570ecbd7d334866099130f.tar.gz | |
Fix combining C and Fortran. Closes #8377.
Diffstat (limited to 'test cases/fortran')
| -rw-r--r-- | test cases/fortran/9 cpp/main.c | 8 | ||||
| -rw-r--r-- | test cases/fortran/9 cpp/meson.build | 12 |
2 files changed, 18 insertions, 2 deletions
diff --git a/test cases/fortran/9 cpp/main.c b/test cases/fortran/9 cpp/main.c new file mode 100644 index 000000000..c1750ad69 --- /dev/null +++ b/test cases/fortran/9 cpp/main.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +double fortran(void); + +int main(void) { + printf("FORTRAN gave us this number: %lf.\n", fortran()); + return 0; +} diff --git a/test cases/fortran/9 cpp/meson.build b/test cases/fortran/9 cpp/meson.build index 7f73985cd..f96944b79 100644 --- a/test cases/fortran/9 cpp/meson.build +++ b/test cases/fortran/9 cpp/meson.build @@ -1,4 +1,4 @@ -project('C++ and FORTRAN', 'cpp', 'fortran') +project('C, C++ and Fortran', 'c', 'cpp', 'fortran') cpp = meson.get_compiler('cpp') fc = meson.get_compiler('fortran') @@ -17,9 +17,17 @@ if fc.get_id() == 'intel' endif e = executable( + 'cfort', + ['main.c', 'fortran.f'], + dependencies : link_with, +) + +test('C and Fortran', e) + +e2 = executable( 'cppfort', ['main.cpp', 'fortran.f'], dependencies : link_with, ) -test('C++ FORTRAN', e) +test('C++ and Fortran', e2) |
