Debian Codegraph @

test cases/common/48 file grabber/meson.build

raw
1 project('grabber', 'c')
2
3 # What this script does is NOT reliable. Simply adding a file in this directory
4 # will NOT make it automatically appear in the build. You have to manually
5 # re-invoke Meson (not just Ninja) for that to happen. The simplest way
6 # is to touch meson-private/coredata.dat.
7
8 # This is not the recommended way to do things, but if the tradeoffs are
9 # acceptable to you, then we're certainly not going to stop you. Just don't
10 # file bugs when it fails. :)
11
12 if build_machine.system() == 'windows'
13 c = run_command('grabber.bat', check: false)
14 grabber = find_program('grabber2.bat')
15 else
16 c = run_command('grabber.sh', check: false)
17 grabber = find_program('grabber.sh')
18 endif
19
20
21 # First test running command explicitly.
22 if c.returncode() != 0
23 error('Executing script failed.')
24 endif
25
26 newline = '''
27 '''
28
29 sources = c.stdout().strip().split(newline)
30
31 e = executable('prog', sources)
32 test('grabtest', e)
33
34 # Then test using program with find_program
35 subdir('subdir')