parent
e6e5566b6f
commit
124b5cc392
2 changed files with 19 additions and 9 deletions
@ -1,12 +1,20 @@ |
||||
project('find program', 'c') |
||||
|
||||
cp = find_program('cp', required : true) |
||||
if host.name() == 'windows' |
||||
# Things Windows does not provide: |
||||
# - an executable to copy files without prompting |
||||
# - working command line quoting |
||||
# - anything that you might actually need |
||||
# Because of these reasons we only check that |
||||
# the program can be found. |
||||
cp = find_program('xcopy', required : true) |
||||
else |
||||
cp = find_program('cp', required : true) |
||||
gen = generator(cp, \ |
||||
output_name : '@BASENAME@.c', \ |
||||
arguments : ['@INPUT@', '@OUTPUT@']) |
||||
|
||||
|
||||
gen = generator(cp, \ |
||||
output_name : '@BASENAME@.c', \ |
||||
arguments : ['@INPUT@', '@OUTPUT@']) |
||||
|
||||
generated = gen.process('source.in') |
||||
e = executable('prog', generated) |
||||
add_test('external exe', e) |
||||
generated = gen.process('source.in') |
||||
e = executable('prog', generated) |
||||
add_test('external exe', e) |
||||
endif |
||||
|
Loading…
Reference in new issue