Eli Schwartz d95a3f5097
meson: fix warnings in build files
meson prefers that project-level options for Wall/Wextra/pedantic be
used, rather than hardcoding raw flags in add_project_arguments. If you
do the latter anyway, it raises a meson warning.

Set the default options for the project to use all this.

Also move the -Werror comment to the project default options with
appropriate format, but leave it commented out since it does not work.
2021-08-09 20:17:00 -04:00

25 lines
1.1 KiB
Meson

# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree).
# #############################################################################
zstd_rootdir = '../../../..'
pzstd_includes = include_directories(join_paths(zstd_rootdir, 'programs'),
join_paths(zstd_rootdir, 'contrib/pzstd'))
pzstd_sources = [join_paths(zstd_rootdir, 'programs/util.c'),
join_paths(zstd_rootdir, 'contrib/pzstd/main.cpp'),
join_paths(zstd_rootdir, 'contrib/pzstd/Options.cpp'),
join_paths(zstd_rootdir, 'contrib/pzstd/Pzstd.cpp'),
join_paths(zstd_rootdir, 'contrib/pzstd/SkippableFrame.cpp')]
pzstd = executable('pzstd',
pzstd_sources,
cpp_args: [ '-DNDEBUG', '-Wno-shadow', '-Wno-deprecated-declarations' ],
include_directories: pzstd_includes,
dependencies: [ libzstd_dep, thread_dep ],
install: true)