Skip to content

Commit

Permalink
dependencies/mpi: Correctly handle a language of None
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Dec 20, 2024
1 parent 2fac482 commit 036caec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mesonbuild/dependencies/mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def mpi_factory(env: 'Environment',
for_machine: 'MachineChoice',
kwargs: T.Dict[str, T.Any],
methods: T.List[DependencyMethods]) -> T.List['DependencyGenerator']:
language = kwargs.get('language', 'c')
language = kwargs.get('language')
if language is None:
language = 'c'
if language not in {'c', 'cpp', 'fortran'}:
# OpenMPI doesn't work without any other languages
return []
Expand Down

0 comments on commit 036caec

Please sign in to comment.