summaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-04-06 15:26:40 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-04-11 23:18:43 +0300
commita54506fe46da7e5a1a4760a4e4eebda262bf585e (patch)
treed21c3c4c4314b466945d21bc8269c4447595dc52 /test cases/common
parent77dad3153d3f0b9f2ffab933f410995b6c1991cf (diff)
downloadmeson-a54506fe46da7e5a1a4760a4e4eebda262bf585e.tar.gz
Handle BuildTarget as custom_target() argument #6914
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/93 selfbuilt custom/checkarg.cpp6
-rw-r--r--test cases/common/93 selfbuilt custom/meson.build11
2 files changed, 17 insertions, 0 deletions
diff --git a/test cases/common/93 selfbuilt custom/checkarg.cpp b/test cases/common/93 selfbuilt custom/checkarg.cpp
new file mode 100644
index 000000000..99092eea0
--- /dev/null
+++ b/test cases/common/93 selfbuilt custom/checkarg.cpp
@@ -0,0 +1,6 @@
+#include <cassert>
+
+int main(int argc, char *[]) {
+ assert(argc == 2);
+ return 0;
+}
diff --git a/test cases/common/93 selfbuilt custom/meson.build b/test cases/common/93 selfbuilt custom/meson.build
index e5da27ef9..fc5d916eb 100644
--- a/test cases/common/93 selfbuilt custom/meson.build
+++ b/test cases/common/93 selfbuilt custom/meson.build
@@ -14,3 +14,14 @@ hfile = custom_target('datah',
main = executable('mainprog', 'mainprog.cpp', hfile)
test('maintest', main)
+
+lib = library('libtool', 'tool.cpp')
+
+checkarg = executable('checkarg', 'checkarg.cpp')
+
+ctlib = custom_target('ctlib',
+ output : 'ctlib.out',
+ capture : true,
+ command : [checkarg, lib],
+ build_by_default : true,
+)