environment: do not raise exception in detect_cuda_compiler

when the compiler is not a string.  When the compiler
is set in the build configuration (required, for example,
in a cross-build setup), the compiler setting is already
a list, which is the desired type.

Signed-off-by: Matt Madison <matt@madison.systems>
pull/7513/merge
Matt Madison 4 years ago committed by Daniel Mensinger
parent 4ad4565ddd
commit 3eab43136c
  1. 2
      mesonbuild/environment.py

@ -1383,8 +1383,6 @@ class Environment:
for compiler in compilers:
if isinstance(compiler, str):
compiler = [compiler]
else:
raise EnvironmentException()
arg = '--version'
try:
p, out, err = Popen_safe(compiler + [arg])

Loading…
Cancel
Save