Merge pull request #129 from Flamefire/cxx11-requirements

Add C++11 requirements to build files
This commit is contained in:
Andrzej Krzemieński
2024-08-16 20:26:04 +02:00
committed by GitHub
3 changed files with 20 additions and 1 deletions

View File

@ -10,6 +10,7 @@ on:
env:
UBSAN_OPTIONS: print_stacktrace=1
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
posix:
@ -58,7 +59,7 @@ jobs:
address-model: 32,64
- toolset: gcc-11
cxxstd: "03,11,14,17,20"
os: ubuntu-20.04
os: ubuntu-22.04
install: g++-11-multilib
address-model: 32,64
- toolset: gcc-12

View File

@ -22,6 +22,7 @@ target_link_libraries(boost_optional
Boost::throw_exception
Boost::type_traits
)
target_compile_features(boost_optional INTERFACE cxx_std_11)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

View File

@ -2,6 +2,7 @@
#
# Copyright (C) 2003, Fernando Luis Cacciola Carballal.
# Copyright (C) 2014 - 2017 Andrzej Krzemienski
# Copyright (C) 2024 Alexander Grund
#
# Use, modification, and distribution is subject to the Boost Software
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -13,8 +14,24 @@
# akrzemi1@gmail.com
#
import config : requires ;
import testing ;
project
: requirements
[ requires
cxx11_decltype
cxx11_defaulted_functions
cxx11_defaulted_moves
cxx11_deleted_functions
cxx11_explicit_conversion_operators
cxx11_noexcept
cxx11_rvalue_references
cxx11_variadic_templates
]
;
run optional_test.cpp ;
run optional_test_assign.cpp ;
run optional_test_swap.cpp ;