From 44c0e223305e295f61fcfe1d52967c19731fbe1f Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Tue, 30 Jul 2013 22:06:42 +0300 Subject: Can check for members in structures. --- test cases/common/44 has member/meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test cases/common/44 has member/meson.build (limited to 'test cases') diff --git a/test cases/common/44 has member/meson.build b/test cases/common/44 has member/meson.build new file mode 100644 index 0000000..fa01877 --- /dev/null +++ b/test cases/common/44 has member/meson.build @@ -0,0 +1,11 @@ +project('has member', 'c') + +cc = meson.get_compiler('c') + +if not cc.has_member('struct tm', 'tm_sec', prefix : '#include') + error('Did not detect member that exists.') +endif + +if cc.has_member('struct tm', 'tm_nonexistent', prefix : '#include') + error('Not existing member found.') +endif -- cgit v1.1