Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax meson pins in CI and Fix Missed Warnings #60681

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Ignore narrowing conversion warning on MSVC
WillAyd committed Feb 21, 2025
commit 180b7938f5091db6b375e91c34843e0c395da9a9
28 changes: 17 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
@@ -15,19 +15,25 @@ 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',
)
# ignore some MSVC warnings for narrowing
'/wd4244',
'/wd4267',
]

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')