From 3997649139b76a15dfd6d5a2ce406b86c7728748 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 28 Jan 2019 20:39:52 +0200 Subject: [PATCH] Disable mixed (mscv/clang + gnu) Windows Fortran tests. Closes #4829. --- test cases/common/190 openmp/meson.build | 12 +++++++----- test cases/fortran/9 cpp/meson.build | 6 +++++- test cases/frameworks/17 mpi/meson.build | 12 +++++++----- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/test cases/common/190 openmp/meson.build b/test cases/common/190 openmp/meson.build index f4652db7a..e4468915d 100644 --- a/test cases/common/190 openmp/meson.build +++ b/test cases/common/190 openmp/meson.build @@ -38,11 +38,13 @@ test('OpenMP C++', execpp, env : env) if add_languages('fortran', required : false) - exef = executable('exef', - 'main.f90', - dependencies : [openmp]) - - test('OpenMP Fortran', execpp, env : env) + # Mixing compilers (msvc/clang with gfortran) does not seem to work on Windows. + if build_machine.system() != 'windows' or cc.get_id() == 'gnu' + exef = executable('exef', + 'main.f90', + dependencies : [openmp]) + test('OpenMP Fortran', execpp, env : env) + endif endif # Check we can apply a version constraint diff --git a/test cases/fortran/9 cpp/meson.build b/test cases/fortran/9 cpp/meson.build index 21a7449c7..ad7d4b206 100644 --- a/test cases/fortran/9 cpp/meson.build +++ b/test cases/fortran/9 cpp/meson.build @@ -1,12 +1,16 @@ project('C++ and FORTRAN', 'cpp', 'fortran') cpp = meson.get_compiler('cpp') +fc = meson.get_compiler('fortran') if cpp.get_id() == 'clang' error('MESON_SKIP_TEST Clang C++ does not find -lgfortran for some reason.') endif -fc = meson.get_compiler('fortran') +if build_machine.system() == 'windows' and cpp.get_id() != 'gnu' + error('MESON_SKIP_TEST mixing gfortran with non-GNU C++ does not work.') +endif + link_with = [] if fc.get_id() == 'intel' link_with += fc.find_library('ifport') diff --git a/test cases/frameworks/17 mpi/meson.build b/test cases/frameworks/17 mpi/meson.build index 2102b817f..2d0e4d347 100644 --- a/test cases/frameworks/17 mpi/meson.build +++ b/test cases/frameworks/17 mpi/meson.build @@ -36,11 +36,13 @@ uburesult = run_command(ubudetector) if uburesult.returncode() != 0 and add_languages('fortran', required : false) mpifort = dependency('mpi', language : 'fortran') - exef = executable('exef', - 'main.f90', - dependencies : [mpifort]) - - test('MPI Fortran', exef) + # Mixing compilers (msvc/clang with gfortran) does not seem to work on Windows. + if build_machine.system() != 'windows' or cc.get_id() == 'gnu' + exef = executable('exef', + 'main.f90', + dependencies : [mpifort]) + test('MPI Fortran', exef) + endif endif # Check we can apply a version constraint