aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2021-10-06 10:32:13 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-10-06 13:35:24 -0700
commitb19530bd7dc99e0b5d71acd5cdf85af915b9ddcc (patch)
tree9d61ddce158819c0a6b85080a5230341776f25cd
parent29c2b44a29cea47696b4026673874260ac547ab7 (diff)
downloadmeson-b19530bd7dc99e0b5d71acd5cdf85af915b9ddcc.zip
meson-b19530bd7dc99e0b5d71acd5cdf85af915b9ddcc.tar.gz
meson-b19530bd7dc99e0b5d71acd5cdf85af915b9ddcc.tar.bz2
Fix compiler detection for cl/clang-cl
If the compiler specified is a path to a compiler, the current detection is broken. It needs to use just the compiler name instead.
-rw-r--r--mesonbuild/compilers/detect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
index a839279..5e0710b 100644
--- a/mesonbuild/compilers/detect.py
+++ b/mesonbuild/compilers/detect.py
@@ -363,7 +363,7 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin
compiler = [compiler]
compiler_name = os.path.basename(compiler[0])
- if not {'cl', 'cl.exe', 'clang-cl', 'clang-cl.exe'}.isdisjoint(compiler):
+ if any(os.path.basename(x) in {'cl', 'cl.exe', 'clang-cl', 'clang-cl.exe'} for x in compiler):
# Watcom C provides it's own cl.exe clone that mimics an older
# version of Microsoft's compiler. Since Watcom's cl.exe is
# just a wrapper, we skip using it if we detect its presence