Skip to content

Commit

Permalink
Ignore narrowing conversion warning on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jan 8, 2025
1 parent 05c4c12 commit 41c2b59
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,23 @@ py = import('python').find_installation(pure: false)
tempita = files('generate_pxi.py')
versioneer = files('generate_version.py')


add_project_arguments('-DNPY_NO_DEPRECATED_API=0', language: 'c')
add_project_arguments('-DNPY_NO_DEPRECATED_API=0', language: 'cpp')

# Allow supporting older numpys than the version compiled against
# Set the define to the min supported version of numpy for pandas
# e.g. right now this is targeting numpy 1.21+
add_project_arguments('-DNPY_TARGET_VERSION=NPY_1_21_API_VERSION', language: 'c')
add_project_arguments(
cc = meson.get_compiler('c')
cp = meson.get_compiler('cpp')

project_args = [
'-DNPY_NO_DEPRECATED_API=0',
# Allow supporting older numpys than the version compiled against
# Set the define to the min supported version of numpy for pandas
# e.g. right now this is targeting numpy 1.21+
'-DNPY_TARGET_VERSION=NPY_1_21_API_VERSION',
language: 'cpp',
)
'/wd4244', # msvc warning for narrowing
]

c_args = cc.get_supported_arguments(project_args)
cpp_args = cp.get_supported_arguments(project_args)

add_project_arguments(c_args, language: 'c')
add_project_arguments(cpp_args, language: 'cpp')

if fs.exists('_version_meson.py')
py.install_sources('_version_meson.py', subdir: 'pandas')
Expand Down

0 comments on commit 41c2b59

Please sign in to comment.