parent
716140ddb4
commit
12d4031f52
11 changed files with 109 additions and 17 deletions
@ -0,0 +1,12 @@ |
|||||||
|
## alias_target |
||||||
|
|
||||||
|
``` meson |
||||||
|
runtarget alias_target(target_name, dep1, ...) |
||||||
|
``` |
||||||
|
|
||||||
|
This function creates a new top-level target. Like all top-level targets, this |
||||||
|
integrates with the selected backend. For instance, with Ninja you can |
||||||
|
run it as `ninja target_name`. This is a dummy target that does not execute any |
||||||
|
command, but ensures that all dependencies are built. Dependencies can be any |
||||||
|
build target (e.g. return value of executable(), custom_target(), etc) |
||||||
|
|
@ -0,0 +1,3 @@ |
|||||||
|
int main(int argc, char *argv[]) { |
||||||
|
return 0; |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
project('alias target', 'c') |
||||||
|
|
||||||
|
python3 = import('python').find_installation() |
||||||
|
|
||||||
|
exe_target = executable('prog', 'main.c', |
||||||
|
build_by_default : false) |
||||||
|
|
||||||
|
custom_target = custom_target('custom-target', |
||||||
|
output : 'hello.txt', |
||||||
|
command : [python3, '-c', 'print("hello")'], |
||||||
|
capture : true, |
||||||
|
build_by_default : false |
||||||
|
) |
||||||
|
|
||||||
|
alias_target('build-all', [exe_target, custom_target]) |
Loading…
Reference in new issue