mirror of
https://github.com/facebook/zstd.git
synced 2025-03-06 16:56:49 +02:00
Meson always returns -pthread in dependency('threads') on non-MSVC compilers. On Windows we use Windows threading primitives, so we don't need this. Avoid adding -pthread to libzstd's link flags, either as a Meson subproject or via pkg-config Libs.private, so the application doesn't inadvertently depend on winpthreads. Add a Meson MinGW cross-compile CI test that checks for this. It turns out that pzstd fails to build in that environment, so have the test skip building contrib for now.
37 lines
1.8 KiB
Meson
37 lines
1.8 KiB
Meson
# #############################################################################
|
|
# Copyright (c) 2018-present Dima Krasner <dima@dimakrasner.com>
|
|
# 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).
|
|
# #############################################################################
|
|
|
|
# Read guidelines from https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
|
|
|
|
option('legacy_level', type: 'integer', min: 0, max: 7, value: 5,
|
|
description: 'Support any legacy format: 7 to 1 for v0.7+ to v0.1+')
|
|
option('debug_level', type: 'integer', min: 0, max: 9, value: 1,
|
|
description: 'Enable run-time debug. See lib/common/debug.h')
|
|
option('backtrace', type: 'feature', value: 'disabled',
|
|
description: 'Display a stack backtrace when execution generates a runtime exception')
|
|
option('static_runtime', type: 'boolean', value: false,
|
|
description: 'Link to static run-time libraries on MSVC')
|
|
|
|
option('bin_programs', type: 'boolean', value: true,
|
|
description: 'Enable programs build')
|
|
option('bin_tests', type: 'boolean', value: false,
|
|
description: 'Enable tests build')
|
|
option('bin_contrib', type: 'boolean', value: false,
|
|
description: 'Enable contrib build')
|
|
|
|
option('multi_thread', type: 'feature', value: 'enabled',
|
|
description: 'Enable multi-threading when pthread or Windows is detected')
|
|
option('zlib', type: 'feature', value: 'auto',
|
|
description: 'Enable zlib support')
|
|
option('lzma', type: 'feature', value: 'auto',
|
|
description: 'Enable lzma support')
|
|
option('lz4', type: 'feature', value: 'auto',
|
|
description: 'Enable lz4 support')
|