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 (28 lines) | stat: -rw-r--r-- 1,346 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
project('comparer', 'c')

# Added manually as a c_arg to test handling of include paths with backslashes
# and spaces. This is especially useful on Windows in vcxproj files since it
# stores include directories in a separate element that has its own
# context-specific escaping/quoting.
include_dir = meson.current_source_dir() + '/include'
default_c_args = ['-I' + include_dir]

if meson.get_compiler('c').get_argument_syntax() == 'msvc'
  default_c_args += ['/Faasm output\\']
  # Hack to create the 'asm output' directory in the builddir
  subdir('asm output')
endif

# Path can contain \. Here we're sending `"foo\bar"`.
test('backslash quoting',
     executable('comparer', 'comparer.c',
                c_args : default_c_args + ['-DDEF_WITH_BACKSLASH="foo\\bar"']))
# Path can end in \ without any special quoting. Here we send `"foo\bar\"`.
test('backslash end quoting',
     executable('comparer-end', 'comparer-end.c',
                c_args : default_c_args + ['-DDEF_WITH_BACKSLASH="foo\\bar\\"']))
# Path can (really) end in \ if we're not passing a string literal without any
# special quoting. Here we're sending `foo\bar\`.
test('backslash end quoting when not a string literal',
     executable('comparer-end-notstring', 'comparer-end-notstring.c',
                c_args : default_c_args + ['-DDEF_WITH_BACKSLASH=foo\\bar\\']))