Merge pull request #10464 from rtbo/fix_generated_deps
add D generated files to order-only depspull/10542/head
commit
df4714be95
5 changed files with 50 additions and 2 deletions
@ -0,0 +1,9 @@ |
||||
module exe; |
||||
|
||||
import generated; |
||||
import std.stdio; |
||||
|
||||
int main() |
||||
{ |
||||
return generatedString() == "Some text to be returned by generated code" ? 0 : 1; |
||||
} |
@ -0,0 +1,13 @@ |
||||
module generator; |
||||
|
||||
import std.file; |
||||
import std.stdio; |
||||
import std.string; |
||||
|
||||
void main(string[] args) |
||||
{ |
||||
const text = cast(string)read(args[1]); |
||||
|
||||
writeln("module generated;"); |
||||
writefln!`string generatedString() { return "%s"; }`(text.strip()); |
||||
} |
@ -0,0 +1 @@ |
||||
Some text to be returned by generated code |
@ -0,0 +1,18 @@ |
||||
project('meson-dep-test', 'd') |
||||
|
||||
generator = executable('generator', 'generator.d') |
||||
|
||||
generated = custom_target('generated', |
||||
capture: true, |
||||
output: 'generated.d', |
||||
input: 'input.txt', |
||||
command: [ |
||||
generator, '@INPUT@' |
||||
] |
||||
) |
||||
|
||||
exe = executable('exe', generated, 'exe.d', |
||||
include_directories: include_directories('.'), |
||||
) |
||||
|
||||
test('test exe', exe) |
Loading…
Reference in new issue