From 44dc02849995188f8b25158d2c71009aeb264910 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 24 Aug 2017 11:34:12 -0300 Subject: [PATCH] tests: Check that generated sources can be used in csharp targets --- test cases/csharp/2 library/meson.build | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test cases/csharp/2 library/meson.build b/test cases/csharp/2 library/meson.build index 2082e0375..6b246a4bd 100644 --- a/test cases/csharp/2 library/meson.build +++ b/test cases/csharp/2 library/meson.build @@ -1,5 +1,15 @@ project('C# library', 'cs') -l = shared_library('helper', 'helper.cs', install : true) +python3 = import('python3').find_python() +generated_sources = custom_target('gen_sources', + input: 'helper.cs', + output: 'helper.cs', + command: [python3, '-c', + 'import shutil, sys; shutil.copyfile(sys.argv[1], sys.argv[2])', + '@INPUT@', '@OUTPUT@'] +) + +l = shared_library('helper', generated_sources, install : true) + e = executable('prog', 'prog.cs', link_with : l, install : true) test('libtest', e)