File: meson.build

package info (click to toggle)
numpy 1%3A2.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 83,420 kB
  • sloc: python: 248,499; asm: 232,365; ansic: 216,874; cpp: 135,657; f90: 1,540; sh: 938; fortran: 558; makefile: 409; sed: 139; xml: 109; java: 92; perl: 79; cs: 54; javascript: 53; objc: 29; lex: 13; yacc: 9
file content (23 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
project('zlib system dependency', 'c')

if not ['darwin', 'freebsd', 'dragonfly', 'windows', 'android'].contains(host_machine.system())
  error('MESON_SKIP_TEST only applicable on macOS, FreeBSD, DragonflyBSD, Windows, and Android.')
endif

cc = meson.get_compiler('c')

if host_machine.system() == 'darwin' and cc.get_id() != 'clang'
  # this will only work on mac if using Apple's clang compiler, but there is no
  # way in the meson source level to differentiate apple clang and llvm clang
  # In the meson CI only apple clang is tested
  error('MESON_SKIP_TEST on macOS only clang is supported.')
endif

if not (cc.find_library('z', required: false).found() or
        cc.find_library('zlib', required : false).found() or
        cc.find_library('zlib1', required : false).found())
  error('MESON_SKIP_TEST Cannot seem to find zlib via find_library, this test will probably fail.')
endif

z = dependency('zlib', method : 'system')
assert(z.version().version_compare('>= 1.2'), 'Version does not seem to have been detected correctly.')