From 39c751b94c5e12bb7a48a64941ccf225d93359ff Mon Sep 17 00:00:00 2001 From: Jason Francis Date: Mon, 22 Mar 2021 08:50:10 -0400 Subject: introspection: export all sources for custom targets Also adds some test cases for source files in target_sources. --- test cases/unit/57 introspection/meson.build | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test cases') diff --git a/test cases/unit/57 introspection/meson.build b/test cases/unit/57 introspection/meson.build index 2b38151..2f666f3 100644 --- a/test cases/unit/57 introspection/meson.build +++ b/test cases/unit/57 introspection/meson.build @@ -27,13 +27,18 @@ var1 = '1' var2 = 2.to_string() var3 = 'test3' -cus = custom_target('custom target test', output: 'file2', input: 'cp.py', - command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) +cus1 = custom_target('custom target test 1', output: 'file2', input: 'cp.py', + command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) +cus2 = custom_target('custom target test 2', output: 'file3', input: cus1, + command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) t1 = executable('test' + var1, ['t1.cpp'], link_with: [sharedlib], install: not false, build_by_default: get_option('test_opt2')) t2 = executable('test@0@'.format('@0@'.format(var2)), sources: ['t2.cpp'], link_with: [staticlib]) t3 = executable(var3, 't3.cpp', link_with: [sharedlib, staticlib], dependencies: [dep1]) +cus3 = custom_target('custom target test 3', output: 'file4', input: t3, + command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) + ### BEGIN: Test inspired by taisei: https://github.com/taisei-project/taisei/blob/master/meson.build#L293 systype = '@0@'.format(host_machine.system()) systype = '@0@, @1@, @2@'.format(systype, host_machine.cpu_family(), host_machine.cpu()) @@ -49,7 +54,7 @@ message(osmesa_lib_name) # Infinite recursion gets triggered here when the param test('test case 1', t1) test('test case 2', t2, depends: t3) -benchmark('benchmark 1', t3, args: cus) +benchmark('benchmark 1', t3, args: [cus1, cus2, cus3]) ### Stuff to test the AST JSON printer foreach x : ['a', 'b', 'c'] -- cgit v1.1