From ef0e39bac99da2078b6bcb4bd7071ca34f6a3005 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 24 Apr 2021 00:49:07 +0300 Subject: project.boost: turn off warnings unless --verbose --- project/boost/build.py | 4 ++-- project/boost/toolchain.py | 19 ++++++------------- 2 files changed, 8 insertions(+), 15 deletions(-) (limited to 'project') diff --git a/project/boost/build.py b/project/boost/build.py index a00f9f6..fd5ed24 100644 --- a/project/boost/build.py +++ b/project/boost/build.py @@ -46,8 +46,8 @@ DEFAULT_CONFIGURATIONS = (Configuration.DEBUG, Configuration.RELEASE,) # binaries from a CI, etc. and run them everywhere): DEFAULT_LINK = (Linkage.STATIC,) DEFAULT_RUNTIME_LINK = Linkage.STATIC -B2_QUIET = ['-d0'] -B2_VERBOSE = ['-d2', '--debug-configuration'] +B2_QUIET = ['warnings=off', '-d0'] +B2_VERBOSE = ['warnings=all', '-d2', '--debug-configuration'] class BuildParameters: diff --git a/project/boost/toolchain.py b/project/boost/toolchain.py index 8dd11da..e49914c 100644 --- a/project/boost/toolchain.py +++ b/project/boost/toolchain.py @@ -251,14 +251,7 @@ class GCC(CustomToolchain): return 'g++' def get_build_options(self): - return [ - # TODO: this is a petty attempt to get rid of build warnings in - # older Boost versions. Revise and expand this list or remove it? - # warning: 'template class std::auto_ptr' is deprecated - ('cxxflags', '-Wno-deprecated-declarations'), - # warning: unnecessary parentheses in declaration of 'assert_arg' - ('cxxflags', '-Wno-parentheses'), - ] + return [] class MinGW(GCC): @@ -285,11 +278,11 @@ class Clang(GCC): options = super().get_build_options() options += [ ('cxxflags', '-DBOOST_USE_WINDOWS_H'), - # TODO: this is a petty attempt to get rid of build warnings in - # older Boost versions. Revise and expand this list or remove it? - # warning: unused typedef 'boost_concept_check464' [-Wunused-local-typedef] - ('cxxflags', '-Wno-unused-local-typedef'), - # error: constant expression evaluates to -105 which cannot be narrowed to type 'boost::re_detail::cpp_regex_traits_implementation::char_class_type' (aka 'unsigned int') + + # Even with off, the build might sometimes fail with the + # following error: + # + # error: constant expression evaluates to -105 which cannot be narrowed to type 'boost::re_detail::cpp_regex_traits_implementation::char_class_type' (aka 'unsigned int') ('cxxflags', '-Wno-c++11-narrowing'), ] if project.os.on_windows(): -- cgit v1.2.3