meson: Fix deprecated build warnings on build options
Meson now reserves the `build_` prefix for options
This commit is contained in:
parent
4d156854fe
commit
8e590a1af3
@ -203,9 +203,9 @@ matrix:
|
||||
--buildtype=debugoptimized \
|
||||
-Db_lundef=false \
|
||||
-Dauto_features=enabled \
|
||||
-Dbuild_programs=true \
|
||||
-Dbuild_tests=true \
|
||||
-Dbuild_contrib=true \
|
||||
-Dbin_programs=true \
|
||||
-Dbin_tests=true \
|
||||
-Dbin_contrib=true \
|
||||
-Ddefault_library=both \
|
||||
build/meson builddir
|
||||
- pushd builddir
|
||||
|
@ -17,7 +17,7 @@ It outputs one `libzstd`, either shared or static, depending on
|
||||
`cd` to this meson directory (`build/meson`)
|
||||
|
||||
```sh
|
||||
meson --buildtype=release -Dbuild_{programs,contrib}=true builddir
|
||||
meson setup -Dbin_programs=true -Dbin_contrib=true builddir
|
||||
cd builddir
|
||||
ninja # to build
|
||||
ninja install # to install
|
||||
|
@ -75,9 +75,9 @@ legacy_level = get_option('legacy_level')
|
||||
use_backtrace = get_option('backtrace')
|
||||
use_static_runtime = get_option('static_runtime')
|
||||
|
||||
build_programs = get_option('build_programs')
|
||||
build_contrib = get_option('build_contrib')
|
||||
build_tests = get_option('build_tests')
|
||||
bin_programs = get_option('bin_programs')
|
||||
bin_contrib = get_option('bin_contrib')
|
||||
bin_tests = get_option('bin_tests')
|
||||
|
||||
feature_multi_thread = get_option('multi_thread')
|
||||
feature_zlib = get_option('zlib')
|
||||
@ -88,7 +88,7 @@ feature_lz4 = get_option('lz4')
|
||||
# Dependencies
|
||||
# =============================================================================
|
||||
|
||||
libm_dep = cc.find_library('m', required: build_tests)
|
||||
libm_dep = cc.find_library('m', required: bin_tests)
|
||||
thread_dep = dependency('threads', required: feature_multi_thread)
|
||||
use_multi_thread = thread_dep.found()
|
||||
# Arguments in dependency should be equivalent to those passed to pkg-config
|
||||
@ -133,14 +133,14 @@ endif
|
||||
|
||||
subdir('lib')
|
||||
|
||||
if build_programs
|
||||
if bin_programs
|
||||
subdir('programs')
|
||||
endif
|
||||
|
||||
if build_tests
|
||||
if bin_tests
|
||||
subdir('tests')
|
||||
endif
|
||||
|
||||
if build_contrib
|
||||
if bin_contrib
|
||||
subdir('contrib')
|
||||
endif
|
||||
|
@ -19,11 +19,11 @@ option('backtrace', type: 'boolean', value: false,
|
||||
option('static_runtime', type: 'boolean', value: false,
|
||||
description: 'Link to static run-time libraries on MSVC')
|
||||
|
||||
option('build_programs', type: 'boolean', value: true,
|
||||
option('bin_programs', type: 'boolean', value: true,
|
||||
description: 'Enable programs build')
|
||||
option('build_tests', type: 'boolean', value: false,
|
||||
option('bin_tests', type: 'boolean', value: false,
|
||||
description: 'Enable tests build')
|
||||
option('build_contrib', type: 'boolean', value: false,
|
||||
option('bin_contrib', type: 'boolean', value: false,
|
||||
description: 'Enable contrib build')
|
||||
|
||||
option('multi_thread', type: 'feature', value: 'enabled',
|
||||
|
Loading…
Reference in New Issue
Block a user