diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-10-18 14:04:30 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-11-15 18:42:25 -0800 |
commit | 64107f5fe1c5a27762d7ff6ff770c0298c40e3b8 (patch) | |
tree | 2f8fb4db6aab5833de6ac58831f138bf6b188ccb | |
parent | b17ab09eaf049bb4ce002419ec29cf1192bf7c57 (diff) | |
download | meson-64107f5fe1c5a27762d7ff6ff770c0298c40e3b8.zip meson-64107f5fe1c5a27762d7ff6ff770c0298c40e3b8.tar.gz meson-64107f5fe1c5a27762d7ff6ff770c0298c40e3b8.tar.bz2 |
tests: Fix fortran + cpp test for ifort
To make ifort like rand we need to link with ifport, or we don't get
rand.
-rw-r--r-- | test cases/fortran/9 cpp/meson.build | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test cases/fortran/9 cpp/meson.build b/test cases/fortran/9 cpp/meson.build index 49497c0..93037aa 100644 --- a/test cases/fortran/9 cpp/meson.build +++ b/test cases/fortran/9 cpp/meson.build @@ -6,5 +6,16 @@ if cpp.get_id() == 'clang' error('MESON_SKIP_TEST Clang C++ does not find -lgfortran for some reason.') endif -e = executable('cppfort', 'main.cpp', 'fortran.f') +fc = meson.get_compiler('fortran') +link_with = [] +if fc.get_id() == 'intel' + link_with += fc.find_library('ifport') +endif + +e = executable( + 'cppfort', + ['main.cpp', 'fortran.f'], + dependencies : [link_with], +) + test('C++ FORTRAN', e) |