mirror of
https://github.com/boostorg/json.git
synced 2026-01-19 16:22:20 +00:00
building with gcc 4.9 is a noop
This commit is contained in:
@@ -27,7 +27,7 @@ def main(ctx):
|
||||
linux_cxx("UBSan Clang", "clang++-14", packages="clang-14 libstdc++-10-dev", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'ubsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'clang-14', 'B2_CXXSTD': '11,14,17', 'B2_UBSAN': '1', 'B2_DEFINES': 'define=BOOST_NO_STRESS_TEST=1'}, globalenv=globalenv),
|
||||
linux_cxx("TSan", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'tsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_TSAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1'}, globalenv=globalenv, privileged=True),
|
||||
linux_cxx("GDB printers", "g++-12", packages="g++-12 gdb", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'gdb', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_TARGETS': 'libs/json/test//gdb-printers', 'B2_VARIANT': 'debug', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1'}, globalenv=globalenv),
|
||||
linux_cxx("gcc 4.8 C++03 (no op)", "g++-4.8", packages="g++-4.8", image=linuxglobalimage, buildtype="boost", buildscript="drone", environment={"B2_TOOLSET": "gcc-4.8", "B2_CXXSTD": "03", 'B2_SEPARATE_BOOTSTRAP': '1'}, globalenv=globalenv),
|
||||
linux_cxx("gcc 4.9 C++11 (no op)", "g++-4.9", image=linuxglobalimage, buildtype="boost", buildscript="drone", environment={"B2_TOOLSET": "gcc-4.9", "B2_CXXSTD": "11", 'B2_SEPARATE_BOOTSTRAP': '1', 'B2_FLAGS': 'warnings=extra warnings-as-errors=on --with-json'}, globalenv=globalenv),
|
||||
linux_cxx("gcc 5", "g++-5", packages="g++-5", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-5', 'B2_CXXSTD': '11', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
|
||||
linux_cxx("gcc 6", "g++-6", packages="g++-6", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-6', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
|
||||
linux_cxx("gcc 7", "g++-7", packages="g++-7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-7', 'B2_CXXSTD': '14,17', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
|
||||
|
||||
@@ -12,24 +12,43 @@ import-search /boost/config/checks ;
|
||||
|
||||
import boost-pretty-printers ;
|
||||
import config ;
|
||||
import message ;
|
||||
import modules ;
|
||||
|
||||
.warned = ;
|
||||
rule warn-if-requested ( properties * )
|
||||
local args = [ modules.peek : ARGV ] ;
|
||||
local var = [ modules.peek project-config : libraries ] ;
|
||||
if json in [ MATCH ^--with-(json) : $(args) $(var) ]
|
||||
{
|
||||
if ! $(.warned)
|
||||
message warn-if-requested
|
||||
: "warning:" Boost.Json was explicitly requested, but will not be
|
||||
built, because it requires C++11.
|
||||
: "note:" To enable C++11 support, use the 'cxxstd=11' command line
|
||||
argument.
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
alias warn-if-requested ;
|
||||
}
|
||||
|
||||
# disabling has to be done via a separate target because b2 eagerly disables
|
||||
# targets with <build>no in requirements, so warn-if-requested would never be
|
||||
# built and thus would never warn
|
||||
alias disable : : <build>no ;
|
||||
|
||||
explicit warn-if-requested disable ;
|
||||
|
||||
rule requires ( tests + )
|
||||
{
|
||||
local m = [ modules.binding config ] ;
|
||||
local result ;
|
||||
for test in $(tests)
|
||||
{
|
||||
.warned = true ;
|
||||
local args = [ modules.peek : ARGV ] ;
|
||||
local var = [ modules.peek project-config : libraries ] ;
|
||||
if json in [ MATCH ^--with-(json) : $(args) $(var) ]
|
||||
{
|
||||
echo "warning:" Boost.Json was explicitly requested, but will not
|
||||
be built, because it requires C++11. ;
|
||||
echo "note:" To enable C++11 support, use the 'cxxstd=11' command line
|
||||
argument. ;
|
||||
}
|
||||
result += [ check-target-builds $(m:D)//$(test) $(test)
|
||||
: : <source>warn-if-requested <source>disable
|
||||
] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
project
|
||||
@@ -39,13 +58,14 @@ project
|
||||
<link>shared:<define>BOOST_JSON_DYN_LINK=1
|
||||
<link>static:<define>BOOST_JSON_STATIC_LINK=1
|
||||
: requirements
|
||||
[ config.requires
|
||||
[ requires
|
||||
cxx11_constexpr
|
||||
cxx11_decltype
|
||||
cxx11_hdr_tuple
|
||||
cxx11_template_aliases
|
||||
cxx11_variadic_templates
|
||||
cxx11_alignas
|
||||
cxx11_std_align
|
||||
]
|
||||
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
||||
: usage-requirements
|
||||
|
||||
Reference in New Issue
Block a user