diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-09 10:31:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 10:31:52 -0700 |
commit | 4c2d0eb9bcedefa3ef06a237a0502afbc581268b (patch) | |
tree | 1b08ca5fb0c93573409a7a8954e6e1905f8a5b10 /mesonbuild/dependencies/mpi.py | |
parent | 8d54b7bda30062569c981b50a85a175565a7c15a (diff) | |
parent | 057c77f7d08b3372e99065fb3f3cd37f16801a82 (diff) | |
download | meson-4c2d0eb9bcedefa3ef06a237a0502afbc581268b.zip meson-4c2d0eb9bcedefa3ef06a237a0502afbc581268b.tar.gz meson-4c2d0eb9bcedefa3ef06a237a0502afbc581268b.tar.bz2 |
Merge pull request #7657 from mensinda/moreTyping
typing: Strict type annotations
Diffstat (limited to 'mesonbuild/dependencies/mpi.py')
-rw-r--r-- | mesonbuild/dependencies/mpi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/mpi.py b/mesonbuild/dependencies/mpi.py index f25a990..2e1e764 100644 --- a/mesonbuild/dependencies/mpi.py +++ b/mesonbuild/dependencies/mpi.py @@ -24,6 +24,7 @@ from ..environment import detect_cpu_family if T.TYPE_CHECKING: from .base import Dependency from ..compilers import Compiler + from ..compilers.compiler import CompilerType from ..environment import Environment, MachineChoice @@ -36,7 +37,9 @@ def mpi_factory(env: 'Environment', for_machine: 'MachineChoice', return [] candidates = [] # type: T.List[T.Callable[[], Dependency]] - compiler = detect_compiler('mpi', env, for_machine, language) + compiler = detect_compiler('mpi', env, for_machine, language) # type: T.Optional['CompilerType'] + if compiler is None: + return [] compiler_is_intel = compiler.get_id() in {'intel', 'intel-cl'} # Only OpenMPI has pkg-config, and it doesn't work with the intel compilers |