forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct subdir when generating processed file path
We need the subdir of where the output file will actually be created, not the current subdir of the interpreter. Fixes: mesonbuild#13168
- Loading branch information
1 parent
a0ff145
commit 5e1dff2
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
test cases/common/276 generator custom_tgt subdir/include/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test_header = custom_target( | ||
output: 'test_header.h', | ||
command: [touch, '@OUTPUT@'] | ||
) |
21 changes: 21 additions & 0 deletions
21
test cases/common/276 generator custom_tgt subdir/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
project('276 generate custom_tgt subdir') | ||
|
||
touch = find_program('touch', required: false) | ||
if not touch.found() | ||
error('MESON_SKIP_TEST: touch is required to run the test') | ||
endif | ||
|
||
subdir('include') | ||
|
||
gen = generator( | ||
touch, | ||
arguments: ['@OUTPUT@'], | ||
output: '@[email protected]' | ||
) | ||
|
||
custom_target('check-headers.stamp', | ||
command: [touch, '@INPUT@'], | ||
input: gen.process(test_header), | ||
output: 'check-headers.stamp', | ||
build_by_default: true, | ||
) |