From 64107f5fe1c5a27762d7ff6ff770c0298c40e3b8 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 18 Oct 2018 14:04:30 -0700 Subject: [PATCH] tests: Fix fortran + cpp test for ifort To make ifort like rand we need to link with ifport, or we don't get rand. --- test cases/fortran/9 cpp/meson.build | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test cases/fortran/9 cpp/meson.build b/test cases/fortran/9 cpp/meson.build index 49497c07d..93037aa1b 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)