diff --git a/test cases/frameworks/17 mpi/meson.build b/test cases/frameworks/17 mpi/meson.build index 17acd713d..01ad61dc5 100644 --- a/test cases/frameworks/17 mpi/meson.build +++ b/test cases/frameworks/17 mpi/meson.build @@ -6,7 +6,10 @@ if build_machine.system() == 'windows' and cc.get_id() != 'msvc' error('MESON_SKIP_TEST: MPI not available on Windows without MSVC.') endif -mpic = dependency('mpi', language : 'c') +mpic = dependency('mpi', language : 'c', required : false) +if not mpic.found() + error('MESON_SKIP_TEST: MPI not found, skipping.') +endif exec = executable('exec', 'main.c', dependencies : [mpic])