@@ -15,19 +15,25 @@ py = import('python').find_installation(pure: false)
1515tempita = files (' generate_pxi.py' )
1616versioneer = files (' generate_version.py' )
1717
18-
19- add_project_arguments (' -DNPY_NO_DEPRECATED_API=0' , language : ' c' )
20- add_project_arguments (' -DNPY_NO_DEPRECATED_API=0' , language : ' cpp' )
21-
22- # Allow supporting older numpys than the version compiled against
23- # Set the define to the min supported version of numpy for pandas
24- # e.g. right now this is targeting numpy 1.21+
25- add_project_arguments (' -DNPY_TARGET_VERSION=NPY_1_21_API_VERSION' , language : ' c' )
26- add_project_arguments (
18+ cc = meson .get_compiler(' c' )
19+ cp = meson .get_compiler(' cpp' )
20+
21+ project_args = [
22+ ' -DNPY_NO_DEPRECATED_API=0' ,
23+ # Allow supporting older numpys than the version compiled against
24+ # Set the define to the min supported version of numpy for pandas
25+ # e.g. right now this is targeting numpy 1.21+
2726 ' -DNPY_TARGET_VERSION=NPY_1_21_API_VERSION' ,
28- language : ' cpp' ,
29- )
27+ # ignore some MSVC warnings for narrowing
28+ ' /wd4244' ,
29+ ' /wd4267' ,
30+ ]
31+
32+ c_args = cc.get_supported_arguments(project_args)
33+ cpp_args = cp.get_supported_arguments(project_args)
3034
35+ add_project_arguments (c_args, language : ' c' )
36+ add_project_arguments (cpp_args, language : ' cpp' )
3137
3238if fs.exists(' _version_meson.py' )
3339 py.install_sources(' _version_meson.py' , subdir : ' pandas' )
0 commit comments