aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-07-10 22:45:06 -0400
committerNirbheek Chauhan <nirbheek@centricular.com>2022-08-08 19:10:00 +0530
commite10a091179086acee4a70a0f2b3a3e7e4fc6b937 (patch)
tree536ce9e2e0ac33643f75a0e179058526896f7e3a
parent4e094f203b800cd58caef8fff80ee7349f2d1c5b (diff)
downloadmeson-e10a091179086acee4a70a0f2b3a3e7e4fc6b937.zip
meson-e10a091179086acee4a70a0f2b3a3e7e4fc6b937.tar.gz
meson-e10a091179086acee4a70a0f2b3a3e7e4fc6b937.tar.bz2
tests: unskip windows mixing msvc and fortran, for non-gcc fortran
These checked that e.g. the cpp and fc ids are identical, which isn't strictly what we want. Particularly, msvc doesn't even have a fortran compiler, and what we really care about is whether we mix both gcc and something else.
-rw-r--r--test cases/fortran/14 fortran links c/meson.build4
-rw-r--r--test cases/fortran/9 cpp/meson.build2
2 files changed, 4 insertions, 2 deletions
diff --git a/test cases/fortran/14 fortran links c/meson.build b/test cases/fortran/14 fortran links c/meson.build
index a45f06f..380a85a 100644
--- a/test cases/fortran/14 fortran links c/meson.build
+++ b/test cases/fortran/14 fortran links c/meson.build
@@ -3,7 +3,9 @@ project('Fortran calling C', 'fortran', 'c',
default_options : ['default_library=static'])
ccid = meson.get_compiler('c').get_id()
-if ccid == 'msvc' or ccid == 'clang-cl'
+fcid = meson.get_compiler('fortran').get_id()
+
+if fcid == 'gcc' and ccid in ['msvc', 'clang-cl']
error('MESON_SKIP_TEST: MSVC and GCC do not interoperate like this.')
endif
diff --git a/test cases/fortran/9 cpp/meson.build b/test cases/fortran/9 cpp/meson.build
index 270fae5..2afa864 100644
--- a/test cases/fortran/9 cpp/meson.build
+++ b/test cases/fortran/9 cpp/meson.build
@@ -3,7 +3,7 @@ project('C, C++ and Fortran', 'c', 'cpp', 'fortran')
cpp = meson.get_compiler('cpp')
fc = meson.get_compiler('fortran')
-if build_machine.system() == 'windows' and cpp.get_id() != fc.get_id()
+if build_machine.system() == 'windows' and fc.get_id() == 'gcc' and cpp.get_id() != 'gcc'
error('MESON_SKIP_TEST mixing gfortran with non-GNU C++ does not work.')
endif