]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Rename some meson build options to match autoconf convention
authorLzu Tao <taolzu@gmail.com>
Thu, 29 Nov 2018 05:52:35 +0000 (12:52 +0700)
committerLzu Tao <taolzu@gmail.com>
Sat, 1 Dec 2018 16:18:59 +0000 (23:18 +0700)
.travis.yml
build/meson/lib/meson.build
build/meson/meson.build
build/meson/meson_options.txt

index dbea289f6b99427abfd17a7c3392920480485b9a..54d8e431adc693d6d2d19cf9bc4db237d9cddc6f 100644 (file)
@@ -76,7 +76,7 @@ script:
         && pip3.5 install --user meson ninja;
       mkdir build/meson/build;
       pushd "$_";
-      meson --buildtype=debug -Dbuild_contrib=true -Dbuild_tests=true ..
+      meson --buildtype=debug -D with-contrib=true -D with-tests=true -D with-contrib=true ..
         && ninja
         && DESTDIR=./staging ninja install
         && tree ./staging;
index 0c8a750a603bd66ed0d1bd7c2beed6fd877e9547..8a693dc71068cdf94c2b40dd3db7dc97b7bbc010 100644 (file)
@@ -53,14 +53,14 @@ libzstd_sources = [join_paths(library_common_dir, 'entropy_common.c'),
     join_paths(library_deprecated_dir, 'zbuff_compress.c'),
     join_paths(library_deprecated_dir, 'zbuff_decompress.c')]
 
-if legacy_support == '0'
-    legacy_support = 'false'
+if with_legacy_support == '0'
+    with_legacy_support = 'false'
 endif
-if legacy_support != 'false'
-    if legacy_support == 'true'
-        legacy_support = '5'
+if with_legacy_support != 'false'
+    if with_legacy_support == 'true'
+        with_legacy_support = '5'
     endif
-    legacy_int = legacy_support.to_int()
+    legacy_int = with_legacy_support.to_int()
     if legacy_int < 0 or legacy_int >= 8
         legacy_int = 0
     endif
index 18f44e0af3fc65d4aca79fc39142a404ff151a93..7b9b2520e4a322c4bb452014737fa493506c12cb 100644 (file)
@@ -42,15 +42,16 @@ contrib_meson_dir = join_paths(zstd_source_dir, 'contrib', 'meson')
 # =============================================================================
 # Project options
 # =============================================================================
+
 enable_debug = get_option('debug')
-legacy_support = get_option('legacy_support')
-enable_programs = get_option('build_programs')
-enable_tests = get_option('build_tests')
-enable_contrib = get_option('build_contrib')
-enable_multithread = get_option('multithread_support')
-enable_zlib = get_option('zlib_support')
-enable_lzma = get_option('lzma_support')
-enable_lz4 = get_option('lz4_support')
+with_legacy_support = get_option('with-legacy-support')
+with_programs = get_option('with-programs')
+with_tests = get_option('with-tests')
+with_contrib = get_option('with-contrib')
+enable_multithread = get_option('enable-multithread')
+enable_zlib = get_option('enable-zlib')
+enable_lzma = get_option('enable-lzma')
+enable_lz4 = get_option('enable-lz4')
 
 # =============================================================================
 # Helper scripts for Meson
@@ -104,14 +105,14 @@ endif
 
 subdir('lib')
 
-if enable_programs
+if with_programs
     subdir('programs')
 endif
 
-if enable_tests
+if with_tests
     subdir('tests')
 endif
 
-if enable_contrib
+if with_contrib
     subdir('contrib')
 endif
index 86a36523a68886ee2897dcc652a0c14959959b52..dca6df809ecb382241f692f4c9368c709526da6a 100644 (file)
@@ -8,21 +8,21 @@
 # in the COPYING file in the root directory of this source tree).
 # #############################################################################
 
-option('multithread_support', type: 'boolean', value: true,
+option('enable-multithread', type: 'boolean', value: true,
     description: 'Enable multi-threading when pthread is detected')
-option('legacy_support', type: 'string', value: '5',
+option('with-legacy-support', type: 'string', value: '5',
     description: 'Support any legacy format: true or false, or 7 to 1 for v0.7+ to v0.1+')
-option('build_programs', type: 'boolean', value: true,
+option('with-programs', type: 'boolean', value: true,
     description: 'Enable programs build')
-option('build_contrib', type: 'boolean', value: false,
+option('with-contrib', type: 'boolean', value: false,
     description: 'Enable contrib build')
-option('build_tests', type: 'boolean', value: false,
+option('with-tests', type: 'boolean', value: false,
     description: 'Enable tests build')
-option('use_static_runtime', type: 'boolean', value: false,
+option('enable-static-runtime', type: 'boolean', value: false,
     description: 'Link to static run-time libraries on MSVC')
-option('zlib_support', type: 'boolean', value: false,
+option('enable-zlib', type: 'boolean', value: false,
     description: 'Enable zlib support')
-option('lzma_support', type: 'boolean', value: false,
+option('enable-lzma', type: 'boolean', value: false,
     description: 'Enable lzma support')
-option('lz4_support', type: 'boolean', value: false,
+option('enable-lz4', type: 'boolean', value: false,
     description: 'Enable lz4 support')