# Copyright 2015-2026 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt import testing ; project : default-build extra : requirements /boost/variant2//boost_variant2 /boost/core//boost_core /boost/container_hash//boost_container_hash msvc:on gcc:on clang:on ; run quick.cpp ; run variant_size.cpp ; run variant_alternative.cpp ; run variant_holds_alternative.cpp ; compile variant_holds_alternative_cx.cpp ; run variant_get_by_index.cpp ; compile variant_get_by_index_cx.cpp ; run variant_get_by_type.cpp ; compile variant_get_by_type_cx.cpp ; run variant_default_construct.cpp ; compile variant_default_construct_cx.cpp ; run variant_copy_construct.cpp ; compile variant_copy_construct_cx.cpp ; run variant_move_construct.cpp ; compile variant_move_construct_cx.cpp ; run variant_value_construct.cpp ; compile variant_value_construct_cx.cpp ; run variant_in_place_index_construct.cpp ; compile variant_in_place_index_construct_cx.cpp ; run variant_in_place_type_construct.cpp ; compile variant_in_place_type_construct_cx.cpp ; run variant_copy_assign.cpp ; compile variant_copy_assign_cx.cpp ; run variant_move_assign.cpp ; compile variant_move_assign_cx.cpp ; run variant_value_assign.cpp ; compile variant_value_assign_cx.cpp ; run variant_emplace_index.cpp ; compile variant_emplace_index_cx.cpp ; run variant_emplace_type.cpp ; compile variant_emplace_type_cx.cpp ; run variant_swap.cpp ; run variant_eq_ne.cpp ; compile variant_eq_ne_cx.cpp ; run variant_lt_gt.cpp ; compile variant_lt_gt_cx.cpp ; run variant_destroy.cpp ; run variant_visit.cpp ; run variant_convert_construct.cpp ; run variant_subset.cpp ; run variant_valueless.cpp ; run variant_copy_construct_throw.cpp ; run variant_move_construct_throw.cpp ; run variant_convert_construct_throw.cpp ; run variant_copy_assign_throw.cpp ; run variant_move_assign_throw.cpp ; local NX = off msvc:/wd4530 msvc:/wd4577 ; run variant_get_by_index.cpp throw_exception.cpp : : : $(NX) : variant_get_by_index_nx ; compile variant_get_by_index_cx.cpp : $(NX) : variant_get_by_index_cx_nx ; run variant_get_by_type.cpp throw_exception.cpp : : : $(NX) : variant_get_by_type_nx ; compile variant_get_by_type_cx.cpp : $(NX) : variant_get_by_type_cx_nx ; run variant_subset.cpp throw_exception.cpp : : : $(NX) : variant_subset_nx ; run variant_hash.cpp ; run variant_trivial.cpp ; run variant_special.cpp ; run variant_visit_derived.cpp ; # These two tests require /bigobj under GCC/Windows and CMake/VS2022 (for some reason) run variant_many_types.cpp : : : gcc,windows:release gcc,cygwin:release ; run variant_visit_r.cpp : : : gcc,windows:release gcc,cygwin:release ; compile variant_derived_construct.cpp ; run variant_visit_by_index.cpp ; run variant_ostream_insert.cpp ; run is_output_streamable.cpp ; local JSON = /boost/json//boost_json/off "msvc-14.0:no" "msvc-14.2:-wd5104" "norecover:static" "gcc-4.9:no" ; run variant_json_value_from.cpp : : : $(JSON) ; run variant_json_value_to.cpp : : : $(JSON) ; compile variant_uses_double_storage.cpp ; run variant_derived_construct2.cpp ; compile variant_visit_cx.cpp ; compile variant_visit_cx_2.cpp ; compile variant_visit_r_cx.cpp ; local index-type-reqs = release msvc,32:no clang,linux:-ftemplate-depth=1024 # for Clang 3.x ; 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) LIST_SIZE=$(list-size) : variant_index_type_$(list-size) ; } compile variant_default_construct_cx_2.cpp ; compile variant_default_construct_cx_3.cpp ; compile variant_default_construct_cx_4.cpp ; compile variant_default_construct_cx_5.cpp ; compile variant_value_construct_cx_2.cpp ; compile variant_value_construct_cx_3.cpp ; compile variant_value_construct_cx_4.cpp ; # GCC 12+ false positive -Wmaybe-uninitialized with non-trivially-copyable types run variant_issue_55.cpp : : : /boost/system//boost_system # clang-cl 32 bit fails with an assertion in mp_with_index, likely due to a codegen bug "clang-win,32:no" ;