@@ -5,13 +5,29 @@ subdir('cxx')
55subdir (' fortran' )
66
77# -- Fortran calling C++
8- fortran_cxx_math = executable (' fortran_call_cxx ' ,
8+ fortran_cxx_math = executable (' fortran_cxx_math ' ,
99 sources : files (' fortran/math_main.f90' ),
1010 link_with : math_cxx,
1111 link_language : ' fortran'
1212)
1313test (' Fortran C++ math' , fortran_cxx_math, timeout : 5 )
1414
15+ fortran_cxx_struct = executable (' fortran_cxx_struct' ,
16+ sources : files (' fortran/struct_main.f90' ),
17+ include_directories : meson .current_source_dir() / ' c' ,
18+ link_with : struct_cxx
19+ )
20+ test (' Fortran C++ struct' , fortran_cxx_struct, timeout : 5 )
21+
22+ fortran_cxx_err = executable (' fortran_cxx_err' ,
23+ sources : files (' fortran/error_main.f90' ),
24+ link_with : error_cxx,
25+ link_language : ' fortran'
26+ )
27+ test (' Fortran C++ error' , fortran_cxx_err,
28+ timeout : 5 ,
29+ should_fail : true )
30+
1531# -- Fortran calling C
1632fortran_c_math = executable (' fortran_c_math' ,
1733 sources : files (' fortran/math_main.f90' ),
@@ -20,13 +36,22 @@ fortran_c_math = executable('fortran_c_math',
2036)
2137test (' Fortran C math' , fortran_c_math, timeout : 5 )
2238
23- fortran_c_struct = executable (' fortran_call_c ' ,
39+ fortran_c_struct = executable (' fortran_c_struct ' ,
2440 sources : files (' fortran/struct_main.f90' ),
2541 link_with : struct_c,
2642 link_language : ' fortran'
2743)
2844test (' Fortran C struct' , fortran_c_struct, timeout : 5 )
2945
46+ fortran_c_err = executable (' fortran_c_err' ,
47+ sources : files (' fortran/error_main.f90' ),
48+ link_with : error_c,
49+ link_language : ' fortran'
50+ )
51+ test (' Fortran C error' , fortran_c_err,
52+ timeout : 5 ,
53+ should_fail : true )
54+
3055# -- C calling Fortran
3156c_fortran_error = executable (' c_fortran_error' ,
3257 sources : files (' c/error_main.c' ),
@@ -64,6 +89,7 @@ test('C++ Fortran error', cxx_fortran_error,
6489
6590cxx_fortran_struct = executable (' cxx_fortran_struct' ,
6691 sources : files (' cxx/struct_main.cxx' ),
92+ include_directories : meson .current_source_dir() / ' c' ,
6793 link_with : struct_fortran,
6894 link_language : ' fortran'
6995)
0 commit comments