blob: e332c0b1e59889a34088f40c99b0efefcc755ada (
plain)
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
29
30
31
32
33
34
35
|
project('grabber', 'c')
# What this script does is NOT reliable. Simply adding a file in this directory
# will NOT make it automatically appear in the build. You have to manually
# re-invoke Meson (not just Ninja) for that to happen. The simplest way
# is to touch meson-private/coredata.dat.
# This is not the recommended way to do things, but if the tradeoffs are
# acceptable to you, then we're certainly not going to stop you. Just don't
# file bugs when it fails. :)
if build_machine.system() == 'windows'
c = run_command('grabber.bat')
grabber = find_program('grabber2.bat')
else
c = run_command('grabber.sh')
grabber = find_program('grabber.sh')
endif
# First test running command explicitly.
if c.returncode() != 0
error('Executing script failed.')
endif
newline = '''
'''
sources = c.stdout().strip().split(newline)
e = executable('prog', sources)
test('grabtest', e)
# Then test using program with find_program
subdir('subdir')
|