summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2023-01-19 11:53:54 +0200
committerRalf Gommers <ralf.gommers@gmail.com>2023-02-20 21:07:30 +0000
commit587907098e69f833c4cd39aca49127c2f8abecbb (patch)
tree55ea57eb474dfd64106a03502b97ecc58774b313 /numpy
parent8df3626af816b570809e31ac9610148f110af81a (diff)
downloadnumpy-587907098e69f833c4cd39aca49127c2f8abecbb.tar.gz
BUILD: add a windows meson CI job, tweak meson build parameters, fix typo
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/meson.build16
-rw-r--r--numpy/meson.build6
-rw-r--r--numpy/random/meson.build2
3 files changed, 18 insertions, 6 deletions
diff --git a/numpy/core/meson.build b/numpy/core/meson.build
index e094f9dab..651f7a00a 100644
--- a/numpy/core/meson.build
+++ b/numpy/core/meson.build
@@ -589,11 +589,17 @@ c_args_common = [
]
# Same as NPY_CXX_FLAGS (TODO: extend for what ccompiler_opt adds)
-cpp_args_common = c_args_common + [
- '-D__STDC_VERSION__=0', # for compatibility with C headers
- '-fno-exceptions', # no exception support
- '-fno-rtti', # no runtime type information
-]
+if cc.get_id() == 'msvc'
+ cpp_args_common = c_args_common + [
+ '-D__STDC_VERSION__=0', # for compatibility with C headers
+ ]
+else
+ cpp_args_common = c_args_common + [
+ '-D__STDC_VERSION__=0', # for compatibility with C headers
+ '-fno-exceptions', # no exception support
+ '-fno-rtti', # no runtime type information
+ ]
+endif
# Other submodules depend on generated headers and include directories from
# core, wrap those up into a reusable dependency. Also useful for some test
diff --git a/numpy/meson.build b/numpy/meson.build
index 0bb37f8c2..76f3ee8bd 100644
--- a/numpy/meson.build
+++ b/numpy/meson.build
@@ -30,6 +30,9 @@ if is_windows
endif
endif
endif
+if is_msvc
+ add_project_arguments('-DNDEBUG', language: ['c', 'cpp'])
+endif
# Enable UNIX large file support on 32-bit systems (64 bit off_t,
# lseek -> lseek64, etc.)
@@ -77,6 +80,9 @@ dependency_map = {
# TODO: add ILP64 support
have_blas = blas.found() # TODO: and blas.has_cblas()
have_lapack = lapack.found()
+if have_blas
+ add_project_arguments('-DHAVE_CBLAS', language: ['c', 'cpp'])
+endif
# Copy the main __init__.py|pxd files to the build dir (needed for Cython)
__init__py = fs.copyfile('__init__.py')
diff --git a/numpy/random/meson.build b/numpy/random/meson.build
index cc61c66dd..036cd81b9 100644
--- a/numpy/random/meson.build
+++ b/numpy/random/meson.build
@@ -66,7 +66,7 @@ random_pyx_sources = [
fs.copyfile('mtrand.pyx'),
'src/distributions/distributions.c',
'src/legacy/legacy-distributions.c'
- ], ['-DNPY_RANDOM_LEGACY=1'], npymath_lib,
+ ], ['-DNP_RANDOM_LEGACY=1'], npymath_lib,
],
]
foreach gen: random_pyx_sources