aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-05-09 21:43:10 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-05-09 22:43:10 +0300
commitc2ee82cc418d896935d4a96651ba9fa49a53b636 (patch)
tree84e86282e6e3f7550e6c7177739b978415d499c8 /test cases
parentb0f90a793f5ef3e08aa51549773581dff862ddb7 (diff)
downloadmeson-c2ee82cc418d896935d4a96651ba9fa49a53b636.zip
meson-c2ee82cc418d896935d4a96651ba9fa49a53b636.tar.gz
meson-c2ee82cc418d896935d4a96651ba9fa49a53b636.tar.bz2
add support for "target_type: 'shared_module'" in build_target()
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/122 shared module/meson.build4
-rw-r--r--test cases/common/184 bothlibraries/meson.build13
-rw-r--r--test cases/common/4 shared/meson.build1
-rw-r--r--test cases/common/93 default library/meson.build5
4 files changed, 23 insertions, 0 deletions
diff --git a/test cases/common/122 shared module/meson.build b/test cases/common/122 shared module/meson.build
index 3d52300..5d7fed9 100644
--- a/test cases/common/122 shared module/meson.build
+++ b/test cases/common/122 shared module/meson.build
@@ -12,6 +12,10 @@ e = executable('prog', 'prog.c',
link_with : l, export_dynamic : true, dependencies : dl)
test('import test', e, args : m)
+# Same as above, but module created with build_target()
+m2 = build_target('mymodule2', 'module.c', target_type: 'shared_module')
+test('import test 2', e, args : m2)
+
# Shared module that does not export any symbols
shared_module('nosyms', 'nosyms.c',
install : true,
diff --git a/test cases/common/184 bothlibraries/meson.build b/test cases/common/184 bothlibraries/meson.build
index 3a13d62..0bfba76 100644
--- a/test cases/common/184 bothlibraries/meson.build
+++ b/test cases/common/184 bothlibraries/meson.build
@@ -10,3 +10,16 @@ exe_both = executable('prog-both', 'main.c', link_with : both_libs)
test('runtest-shared', exe_shared)
test('runtest-static', exe_static)
test('runtest-both', exe_both)
+
+# Same as above, but using build_target()
+both_libs2 = build_target('mylib2', 'libfile.c', target_type: 'both_libraries')
+exe_shared2 = executable('prog-shared2', 'main.c',
+ link_with : both_libs2.get_shared_lib())
+exe_static2 = executable('prog-static2', 'main.c',
+ c_args : ['-DSTATIC_COMPILATION'],
+ link_with : both_libs2.get_static_lib())
+exe_both2 = executable('prog-both2', 'main.c', link_with : both_libs2)
+
+test('runtest-shared-2', exe_shared2)
+test('runtest-static-2', exe_static2)
+test('runtest-both-2', exe_both2)
diff --git a/test cases/common/4 shared/meson.build b/test cases/common/4 shared/meson.build
index a148272..b2c8fa3 100644
--- a/test cases/common/4 shared/meson.build
+++ b/test cases/common/4 shared/meson.build
@@ -1,2 +1,3 @@
project('shared library test', 'c')
lib = shared_library('mylib', 'libfile.c')
+build_target('mylib2', 'libfile.c', target_type: 'shared_library')
diff --git a/test cases/common/93 default library/meson.build b/test cases/common/93 default library/meson.build
index 903cfe4..508f25f 100644
--- a/test cases/common/93 default library/meson.build
+++ b/test cases/common/93 default library/meson.build
@@ -3,3 +3,8 @@ project('default library', 'cpp')
flib = library('ef', 'ef.cpp')
exe = executable('eftest', 'eftest.cpp', link_with : flib)
test('eftest', exe)
+
+# Same as above, but using build_target()
+flib2 = build_target('ef2', 'ef.cpp', target_type: 'library')
+exe2 = executable('eftest2', 'eftest.cpp', link_with : flib2)
+test('eftest2', exe2)