tests/common/129: Fix configure_file invocation

There is no way for us to know that 'source.c' is a file in the source
tree if it's a string. It needs to be a file object.

This used to work earlier because we used to incorrectly run the
configure_file() command in the source dir (!) instead of the build
dir. This had nasty side-effects such as creating files in the source
tree unless you specified an absolute path...
This commit is contained in:
Nirbheek Chauhan 2017-02-19 08:34:16 +05:30
parent dabf0c1882
commit 79fcd7054d
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ cc = meson.get_compiler('c').cmd_array().get(-1)
# provided by the source tree
source1 = configure_file(input : 'source.c',
output : 'source' + ext,
command : [comp, cc, 'source.c',
command : [comp, cc, files('source.c'),
join_paths(meson.current_build_dir(), 'source' + ext)])
obj = static_library('obj', objects : source1)