1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-01 09:47:01 +03:00

meson: partial fix for building pzstd on MSVC

It uses non-portable compiler options unconditionally. Elsewhere, we
check the compiler ID and only add the right ones, globally. Do the same
here.

NDEBUG can actually be handled by a core option, so while we are moving
things around, do so.

Unfortunately, this doesn't fix things entirely. The remaining issue is
not Meson's issue though -- MSVC simply does not like this source code
and somehow chokes on innocent code with the inscrutable "syntax error"
and "illegal token".
This commit is contained in:
Eli Schwartz
2022-12-14 17:23:24 -05:00
committed by Nick Terrell
parent a91e7ec175
commit e0ef09ddba
2 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,8 @@ pzstd_sources = [join_paths(zstd_rootdir, 'programs/util.c'),
join_paths(zstd_rootdir, 'contrib/pzstd/SkippableFrame.cpp')]
pzstd = executable('pzstd',
pzstd_sources,
cpp_args: [ '-DNDEBUG', '-Wno-shadow', '-Wno-deprecated-declarations' ],
cpp_args: pzstd_warning_flags,
include_directories: pzstd_includes,
dependencies: [ libzstd_dep, thread_dep ],
override_options: ['b_ndebug=true'],
install: true)