summaryrefslogtreecommitdiffstats
path: root/src/interfaces/ecpg/test/preproc/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
commit293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch)
treefc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/interfaces/ecpg/test/preproc/meson.build
parentInitial commit. (diff)
downloadpostgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz
postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/interfaces/ecpg/test/preproc/meson.build')
-rw-r--r--src/interfaces/ecpg/test/preproc/meson.build39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/test/preproc/meson.build b/src/interfaces/ecpg/test/preproc/meson.build
new file mode 100644
index 0000000..8ea77a2
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/meson.build
@@ -0,0 +1,39 @@
+# Copyright (c) 2022-2023, PostgreSQL Global Development Group
+
+pgc_files = [
+ 'array_of_struct',
+ 'autoprep',
+ 'comment',
+ 'cursor',
+ 'define',
+ 'init',
+ 'outofscope',
+ 'pointer_to_struct',
+ 'strings',
+ 'type',
+ 'variable',
+ 'whenever',
+ 'whenever_do_continue',
+]
+
+pgc_extra_flags = {
+ 'array_of_struct': ['-c'],
+ 'pointer_to_struct': ['-c'],
+ 'autoprep': ['-r', 'prepare'],
+ 'strings': ['-i'],
+}
+
+foreach pgc_file : pgc_files
+ exe_input = custom_target('@0@.c'.format(pgc_file),
+ input: '@0@.pgc'.format(pgc_file),
+ command: ecpg_preproc_test_command_start +
+ pgc_extra_flags.get(pgc_file, []) +
+ ecpg_preproc_test_command_end,
+ kwargs: ecpg_preproc_kw,
+ )
+
+ ecpg_test_dependencies += executable(pgc_file,
+ exe_input,
+ kwargs: ecpg_test_exec_kw,
+ )
+endforeach