diff options
| author | Ralf Gommers <ralf.gommers@gmail.com> | 2023-04-07 09:55:57 +0100 |
|---|---|---|
| committer | Ralf Gommers <ralf.gommers@gmail.com> | 2023-04-07 09:59:41 +0100 |
| commit | 924bab9f1a4dc1c606abc68578773664ec7af063 (patch) | |
| tree | 2f4c95fcb87dc677cb67446605a9255c0c0ed9a7 /numpy | |
| parent | d79fe4364c34c3f99c101e1c27824203c78e6dea (diff) | |
| download | numpy-924bab9f1a4dc1c606abc68578773664ec7af063.tar.gz | |
BLD: fix instances of MSVC detection in `meson.build`
Allows clang-cl and other MSVC-compatible compilers to build
correctly.
Closes gh-23506
[skip cirrus] [skip circle] [skip azp]
Co-authored-by: Alexander Neumann <Alexander.Neumann@hamburg.de>
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/meson.build | 6 | ||||
| -rw-r--r-- | numpy/meson.build | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/meson.build b/numpy/core/meson.build index 9aaa5ed87..e968fb336 100644 --- a/numpy/core/meson.build +++ b/numpy/core/meson.build @@ -112,7 +112,7 @@ cdata.set('NPY_SIZEOF_PY_LONG_LONG', if cc.has_header('complex.h') cdata.set10('HAVE_COMPLEX_H', true) cdata.set10('NPY_USE_C99_COMPLEX', true) - if cc.get_id() == 'msvc' + if cc.get_argument_syntax() == 'msvc' complex_types_to_check = [ ['NPY_HAVE_COMPLEX_FLOAT', 'NPY_SIZEOF_COMPLEX_FLOAT', '_Fcomplex', 'float'], ['NPY_HAVE_COMPLEX_DOUBLE', 'NPY_SIZEOF_COMPLEX_DOUBLE', '_Dcomplex', 'double'], @@ -261,7 +261,7 @@ else # function is not available in CI. For the latter there is a fallback path, # but that is broken because we don't have the exact long double # representation checks. - if cc.get_id() != 'msvc' + if cc.get_argument_syntax() != 'msvc' cdata.set10('HAVE_STRTOLD_L', false) endif endif @@ -568,7 +568,7 @@ c_args_common = [ cpp_args_common = c_args_common + [ '-D__STDC_VERSION__=0', # for compatibility with C headers ] -if cc.get_id() != 'msvc' +if cc.get_argument_syntax() != 'msvc' cpp_args_common += [ '-fno-exceptions', # no exception support '-fno-rtti', # no runtime type information diff --git a/numpy/meson.build b/numpy/meson.build index cc5a79bb2..3c0adf6d0 100644 --- a/numpy/meson.build +++ b/numpy/meson.build @@ -10,7 +10,6 @@ endif # Platform detection is_windows = host_machine.system() == 'windows' is_mingw = is_windows and cc.get_id() == 'gcc' -is_msvc = is_windows and cc.get_id() == 'msvc' if is_windows # For mingw-w64, link statically against the UCRT. |
