You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

meson.build 1.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #
  2. # Taken from SciPy (of course)
  3. #
  4. project(
  5. 'openblas-wrap',
  6. 'c', 'fortran',
  7. version: '0.1',
  8. license: 'BSD-3',
  9. meson_version: '>= 1.1.0',
  10. default_options: [
  11. 'buildtype=debugoptimized',
  12. 'b_ndebug=if-release',
  13. 'c_std=c17',
  14. 'fortran_std=legacy',
  15. ],
  16. )
  17. py3 = import('python').find_installation(pure: false)
  18. py3_dep = py3.dependency()
  19. cc = meson.get_compiler('c')
  20. _global_c_args = cc.get_supported_arguments(
  21. '-Wno-unused-but-set-variable',
  22. '-Wno-unused-function',
  23. '-Wno-conversion',
  24. '-Wno-misleading-indentation',
  25. )
  26. add_project_arguments(_global_c_args, language : 'c')
  27. # We need -lm for all C code (assuming it uses math functions, which is safe to
  28. # assume for SciPy). For C++ it isn't needed, because libstdc++/libc++ is
  29. # guaranteed to depend on it. For Fortran code, Meson already adds `-lm`.
  30. m_dep = cc.find_library('m', required : false)
  31. if m_dep.found()
  32. add_project_link_arguments('-lm', language : 'c')
  33. endif
  34. generate_f2pymod = find_program('openblas_wrap/generate_f2pymod.py')
  35. openblas = dependency('openblas', method: 'pkg-config', required: true)
  36. openblas_dep = declare_dependency(
  37. dependencies: openblas,
  38. compile_args: []
  39. )
  40. subdir('openblas_wrap')