Skip to content

Commit c010fd7

Browse files
committed
meson: wip: headerchecks cpluspluschecks
1 parent 3954e81 commit c010fd7

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

src/include/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ config_paths_data.set_quoted('MANDIR', dir_prefix / dir_man)
4444

4545
var_cc = ' '.join(cc.cmd_array())
4646
var_cpp = ' '.join(cc.cmd_array() + ['-E'])
47-
var_cflags = ' '.join(cflags + cflags_builtin + cflags_warn + get_option('c_args'))
47+
var_cflags = ' '.join(cflags + cflags_builtin + cflags_warn + get_option('c_args') + ['-Wall'])
4848
if llvm.found()
49-
var_cxxflags = ' '.join(cxxflags + cxxflags_builtin + cxxflags_warn + get_option('cpp_args'))
49+
var_cxxflags = ' '.join(cxxflags + cxxflags_builtin + cxxflags_warn + get_option('cpp_args') + ['-Wall'])
5050
else
5151
var_cxxflags = ''
5252
endif

src/include/utils/pg_locale.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#define _PG_LOCALE_
1414

1515
#ifdef USE_ICU
16+
/* the cplusplus portion doesn't parse inside extern "C" { } */
17+
#define U_SHOW_CPLUSPLUS_API 0
1618
#include <unicode/ucol.h>
1719
#endif
1820

src/meson.build

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,20 @@ install_data(
5151
install_data(
5252
'makefiles/pgxs.mk',
5353
install_dir: dir_pgxs / 'src' / 'makefiles')
54+
55+
56+
generated_sources_stamp = custom_target('generated-sources-stamp.h',
57+
output: 'generated-sources-stamp.h',
58+
input: [generated_sources, generated_headers_stamp, generated_backend_headers_stamp],
59+
command: stamp_cmd,
60+
)
61+
62+
run_target('headerscheck',
63+
command: [files('tools/pginclude/headerscheck'), '@SOURCE_ROOT@', '@BUILD_ROOT@'],
64+
depends: [generated_sources_stamp, generated_headers_stamp, generated_backend_headers_stamp],
65+
)
66+
67+
run_target('cpluspluscheck',
68+
command: [files('tools/pginclude/headerscheck'), '--cplusplus', '@SOURCE_ROOT@', '@BUILD_ROOT@'],
69+
depends: [generated_sources_stamp, generated_headers_stamp, generated_backend_headers_stamp],
70+
)

0 commit comments

Comments
 (0)