Debian Codegraph @

test cases/fortran/9 cpp/meson.build

raw
1 project('C, C++ and Fortran', 'c', 'cpp', 'fortran')
2
3 cpp = meson.get_compiler('cpp')
4 fc = meson.get_compiler('fortran')
5
6 if build_machine.system() == 'windows' and fc.get_id() == 'gcc' and cpp.get_id() != 'gcc'
7 error('MESON_SKIP_TEST mixing gfortran with non-GNU C++ does not work.')
8 endif
9
10 link_with = []
11 if fc.get_id() == 'intel'
12 link_with += fc.find_library('ifport')
13 endif
14
15 e = executable(
16 'cfort',
17 ['main.c', 'fortran.f'],
18 dependencies : link_with,
19 )
20
21 test('C and Fortran', e)
22
23 e2 = executable(
24 'cppfort',
25 ['main.cpp', 'fortran.f'],
26 dependencies : link_with,
27 )
28
29 test('C++ and Fortran', e2)