parent
e58b3adc70
commit
d2fa6d5080
9 changed files with 63 additions and 6 deletions
@ -0,0 +1,4 @@ |
|||||||
|
## Optional `custom_target()` name |
||||||
|
|
||||||
|
The name argument is now optional and defaults to the basename of the first |
||||||
|
output. |
@ -0,0 +1,14 @@ |
|||||||
|
project('custom target name', 'c') |
||||||
|
|
||||||
|
python = import('python').find_installation() |
||||||
|
|
||||||
|
# Name argument is optional and should default to 'file.txt' |
||||||
|
custom_target( |
||||||
|
input: 'file.txt.in', |
||||||
|
output: '@BASENAME@', |
||||||
|
command: [python, '--version'], |
||||||
|
build_by_default: true, |
||||||
|
capture: true, |
||||||
|
) |
||||||
|
|
||||||
|
subdir('subdir') |
@ -0,0 +1,9 @@ |
|||||||
|
# Name argument is optional and should default to 'file.txt', but should be |
||||||
|
# displayed as 'subdir/file.txt' by ninja. |
||||||
|
custom_target( |
||||||
|
input: '../file.txt.in', |
||||||
|
output: ['@BASENAME@'], |
||||||
|
command: [python, '--version'], |
||||||
|
build_by_default: true, |
||||||
|
capture: true, |
||||||
|
) |
Loading…
Reference in new issue