aboutsummaryrefslogtreecommitdiff
path: root/test cases/csharp
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-24 11:34:12 -0300
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-24 11:34:12 -0300
commit44dc02849995188f8b25158d2c71009aeb264910 (patch)
treea4ee21345500d49770da03f16f9a0d2ad8527af7 /test cases/csharp
parentf2a60b87cbc94a38f3482a7396c513f72b31fa3a (diff)
downloadmeson-44dc02849995188f8b25158d2c71009aeb264910.zip
meson-44dc02849995188f8b25158d2c71009aeb264910.tar.gz
meson-44dc02849995188f8b25158d2c71009aeb264910.tar.bz2
tests: Check that generated sources can be used in csharp targets
Diffstat (limited to 'test cases/csharp')
-rw-r--r--test cases/csharp/2 library/meson.build12
1 files changed, 11 insertions, 1 deletions
diff --git a/test cases/csharp/2 library/meson.build b/test cases/csharp/2 library/meson.build
index 2082e03..6b246a4 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)