2026-01-21 14:58:47 +02:00
|
|
|
# Copyright 2015-2026 Peter Dimov
|
2017-05-29 17:31:05 +03:00
|
|
|
# Distributed under the Boost Software License, Version 1.0.
|
2026-01-21 14:58:47 +02:00
|
|
|
# https://www.boost.org/LICENSE_1_0.txt
|
2017-05-29 17:31:05 +03:00
|
|
|
|
|
|
|
|
import testing ;
|
|
|
|
|
|
2019-03-25 17:40:20 +02:00
|
|
|
project
|
|
|
|
|
: default-build
|
|
|
|
|
|
2020-01-31 23:59:00 +02:00
|
|
|
<warnings>extra
|
2019-03-25 17:40:20 +02:00
|
|
|
|
|
|
|
|
: requirements
|
2024-08-28 20:28:59 +03:00
|
|
|
|
|
|
|
|
<library>/boost/variant2//boost_variant2
|
2024-07-20 21:27:52 -05:00
|
|
|
<library>/boost/core//boost_core
|
2024-08-28 20:28:59 +03:00
|
|
|
<library>/boost/container_hash//boost_container_hash
|
2019-03-25 17:40:20 +02:00
|
|
|
|
|
|
|
|
<toolset>msvc:<warnings-as-errors>on
|
|
|
|
|
<toolset>gcc:<warnings-as-errors>on
|
|
|
|
|
<toolset>clang:<warnings-as-errors>on
|
2024-03-11 08:38:17 -05:00
|
|
|
|
2019-03-25 17:40:20 +02:00
|
|
|
;
|
2017-05-29 17:31:05 +03:00
|
|
|
|
2020-01-09 17:43:54 +02:00
|
|
|
run quick.cpp ;
|
|
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_size.cpp ;
|
|
|
|
|
run variant_alternative.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_holds_alternative.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_holds_alternative_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_get_by_index.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_get_by_index_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_get_by_type.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_get_by_type_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_default_construct.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_default_construct_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_copy_construct.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_copy_construct_cx.cpp ;
|
2017-06-09 17:24:23 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_move_construct.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_move_construct_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_value_construct.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_value_construct_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_in_place_index_construct.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_in_place_index_construct_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_in_place_type_construct.cpp ;
|
2026-01-21 14:42:31 +02:00
|
|
|
compile variant_in_place_type_construct_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_copy_assign.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_copy_assign_cx.cpp ;
|
2017-06-09 15:09:42 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_move_assign.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_move_assign_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_value_assign.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_value_assign_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_emplace_index.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_emplace_index_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_emplace_type.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_emplace_type_cx.cpp ;
|
2017-06-09 14:58:49 +03:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_swap.cpp ;
|
2019-03-06 00:26:55 +02:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_eq_ne.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_eq_ne_cx.cpp ;
|
2019-03-06 00:26:55 +02:00
|
|
|
|
2019-03-06 01:09:40 +02:00
|
|
|
run variant_lt_gt.cpp ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_lt_gt_cx.cpp ;
|
2019-03-06 01:09:40 +02:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_destroy.cpp ;
|
|
|
|
|
run variant_visit.cpp ;
|
2019-03-06 01:09:40 +02:00
|
|
|
|
2018-10-18 04:29:03 +03:00
|
|
|
run variant_convert_construct.cpp ;
|
|
|
|
|
run variant_subset.cpp ;
|
|
|
|
|
run variant_valueless.cpp ;
|
2019-02-26 14:26:59 +02:00
|
|
|
|
|
|
|
|
run variant_copy_construct_throw.cpp ;
|
|
|
|
|
run variant_move_construct_throw.cpp ;
|
|
|
|
|
run variant_convert_construct_throw.cpp ;
|
2019-03-03 05:14:51 +02:00
|
|
|
|
|
|
|
|
run variant_copy_assign_throw.cpp ;
|
|
|
|
|
run variant_move_assign_throw.cpp ;
|
2019-06-03 02:46:59 +03:00
|
|
|
|
|
|
|
|
local NX =
|
|
|
|
|
<exception-handling>off
|
|
|
|
|
<toolset>msvc:<cxxflags>/wd4530
|
|
|
|
|
<toolset>msvc:<cxxflags>/wd4577
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
run variant_get_by_index.cpp throw_exception.cpp : : : $(NX) : variant_get_by_index_nx ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_get_by_index_cx.cpp : $(NX) : variant_get_by_index_cx_nx ;
|
2019-06-03 02:46:59 +03:00
|
|
|
|
|
|
|
|
run variant_get_by_type.cpp throw_exception.cpp : : : $(NX) : variant_get_by_type_nx ;
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_get_by_type_cx.cpp : $(NX) : variant_get_by_type_cx_nx ;
|
2019-06-03 02:46:59 +03:00
|
|
|
|
|
|
|
|
run variant_subset.cpp throw_exception.cpp : : : $(NX) : variant_subset_nx ;
|
2020-01-11 04:51:30 +02:00
|
|
|
|
|
|
|
|
run variant_hash.cpp ;
|
2020-01-23 03:53:05 +02:00
|
|
|
|
|
|
|
|
run variant_trivial.cpp ;
|
2020-01-23 15:24:32 +02:00
|
|
|
run variant_special.cpp ;
|
2020-05-06 20:11:03 +03:00
|
|
|
|
|
|
|
|
run variant_visit_derived.cpp ;
|
2020-05-08 22:22:49 +03:00
|
|
|
|
2026-01-21 19:52:21 +02:00
|
|
|
# These two tests require /bigobj under GCC/Windows and CMake/VS2022 (for some reason)
|
|
|
|
|
|
|
|
|
|
run variant_many_types.cpp : : :
|
|
|
|
|
<toolset>gcc,<target-os>windows:<variant>release
|
|
|
|
|
<toolset>gcc,<target-os>cygwin:<variant>release
|
|
|
|
|
;
|
2020-06-03 17:00:13 +03:00
|
|
|
|
2021-01-13 04:44:56 +02:00
|
|
|
run variant_visit_r.cpp : : :
|
|
|
|
|
<toolset>gcc,<target-os>windows:<variant>release
|
|
|
|
|
<toolset>gcc,<target-os>cygwin:<variant>release
|
|
|
|
|
;
|
2021-03-12 20:15:09 +02:00
|
|
|
|
|
|
|
|
compile variant_derived_construct.cpp ;
|
2021-09-14 21:06:01 +03:00
|
|
|
|
|
|
|
|
run variant_visit_by_index.cpp ;
|
2021-09-15 02:51:11 +03:00
|
|
|
|
|
|
|
|
run variant_ostream_insert.cpp ;
|
2021-12-09 18:34:02 +02:00
|
|
|
run is_output_streamable.cpp ;
|
2022-10-18 06:08:18 +03:00
|
|
|
|
2026-01-01 17:28:41 +02:00
|
|
|
local JSON =
|
|
|
|
|
<library>/boost/json//boost_json/<warnings>off
|
|
|
|
|
"<toolset>msvc-14.0:<build>no"
|
|
|
|
|
"<toolset>msvc-14.2:<cxxflags>-wd5104"
|
|
|
|
|
"<undefined-sanitizer>norecover:<link>static"
|
|
|
|
|
"<toolset>gcc-4.9:<build>no"
|
|
|
|
|
;
|
2022-10-18 06:08:18 +03:00
|
|
|
|
|
|
|
|
run variant_json_value_from.cpp : : : $(JSON) ;
|
|
|
|
|
run variant_json_value_to.cpp : : : $(JSON) ;
|
2023-06-28 22:10:43 +03:00
|
|
|
|
|
|
|
|
compile variant_uses_double_storage.cpp ;
|
2024-03-24 18:41:49 +02:00
|
|
|
|
|
|
|
|
run variant_derived_construct2.cpp ;
|
2024-11-23 03:13:28 +02:00
|
|
|
|
2026-01-21 14:58:47 +02:00
|
|
|
compile variant_visit_cx.cpp ;
|
|
|
|
|
compile variant_visit_cx_2.cpp ;
|
|
|
|
|
compile variant_visit_r_cx.cpp ;
|
2024-12-21 20:15:45 +02:00
|
|
|
|
2024-12-22 06:03:10 +02:00
|
|
|
local index-type-reqs =
|
|
|
|
|
|
2024-12-22 02:55:45 +02:00
|
|
|
<variant>release
|
|
|
|
|
<toolset>msvc,<address-model>32:<build>no
|
2024-12-22 03:20:39 +02:00
|
|
|
<toolset>clang,<target-os>linux:<cxxflags>-ftemplate-depth=1024 # for Clang 3.x
|
2024-12-22 02:55:45 +02:00
|
|
|
;
|
2024-12-22 06:03:10 +02:00
|
|
|
|
|
|
|
|
local list-sizes = 126 127 128 129 254 255 256 257 ;
|
|
|
|
|
|
|
|
|
|
for local list-size in $(list-sizes)
|
|
|
|
|
{
|
|
|
|
|
run variant_index_type.cpp : : : $(index-type-reqs) <define>LIST_SIZE=$(list-size) : variant_index_type_$(list-size) ;
|
|
|
|
|
}
|
2025-10-17 22:55:25 +03:00
|
|
|
|
|
|
|
|
compile variant_default_construct_cx_2.cpp ;
|
2025-10-18 02:37:21 +03:00
|
|
|
compile variant_default_construct_cx_3.cpp ;
|
2025-10-18 02:41:28 +03:00
|
|
|
compile variant_default_construct_cx_4.cpp ;
|
2025-10-18 02:49:29 +03:00
|
|
|
compile variant_default_construct_cx_5.cpp ;
|
2025-10-18 08:24:39 +03:00
|
|
|
|
|
|
|
|
compile variant_value_construct_cx_2.cpp ;
|
|
|
|
|
compile variant_value_construct_cx_3.cpp ;
|
|
|
|
|
compile variant_value_construct_cx_4.cpp ;
|
2025-12-31 06:15:08 -08:00
|
|
|
|
|
|
|
|
# GCC 12+ false positive -Wmaybe-uninitialized with non-trivially-copyable types
|
2026-01-01 22:21:34 +02:00
|
|
|
run variant_issue_55.cpp
|
2026-01-02 12:29:11 +02:00
|
|
|
: : :
|
|
|
|
|
<library>/boost/system//boost_system
|
|
|
|
|
|
|
|
|
|
# clang-cl 32 bit fails with an assertion in mp_with_index, likely due to a codegen bug
|
|
|
|
|
"<toolset>clang-win,<address-model>32:<build>no"
|
|
|
|
|
;
|