]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
meson: Use -werror build option instead of adding -Werror [skip ci]
authorLzu Tao <taolzu@gmail.com>
Sun, 2 Dec 2018 15:33:25 +0000 (22:33 +0700)
committerLzu Tao <taolzu@gmail.com>
Sun, 2 Dec 2018 15:33:43 +0000 (22:33 +0700)
build/meson/meson.build

index c36c9425a1a34b8b9cdf5705fbab7edf46fe90e0..2e1f9d06b0729f828973aecfd42af668f4ec6d3f 100644 (file)
@@ -68,6 +68,7 @@ zstd_docdir = join_paths(zstd_datadir, 'doc', meson.project_name())
 
 # Built-in options
 use_debug = get_option('debug')
+buildtype = get_option('buildtype')
 
 # Custom options
 debug_level = get_option('debug_level')
@@ -132,7 +133,9 @@ add_project_arguments('-DXXH_NAMESPACE=ZSTD_', language: ['c'])
 if [compiler_gcc, compiler_clang].contains(cc_id)
   common_warning_flags = [ '-Wextra', '-Wundef', '-Wshadow', '-Wcast-align', '-Wcast-qual' ]
   if cc_id == compiler_clang
-    common_warning_flags += ['-Werror', '-Wconversion', '-Wno-sign-conversion', '-Wdocumentation']
+    # Should use Meson's own --werror build option
+    #common_warning_flags += '-Werror'
+    common_warning_flags += ['-Wconversion', '-Wno-sign-conversion', '-Wdocumentation']
   endif
   cc_compile_flags = cc.get_supported_arguments(common_warning_flags + ['-Wstrict-prototypes'])
   cxx_compile_flags = cxx.get_supported_arguments(common_warning_flags)