Skip to content

Commit

Permalink
tests: unskip windows mixing msvc and fortran, for non-gcc fortran
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eli-schwartz authored and nirbheek committed Aug 8, 2022
1 parent 4e094f2 commit e10a091
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test cases/fortran/14 fortran links c/meson.build
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test cases/fortran/9 cpp/meson.build
Expand Up @@ -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

Expand Down

0 comments on commit e10a091

Please sign in to comment.