mirror of
https://github.com/boostorg/locale.git
synced 2025-05-09 15:14:03 +00:00
Require C++11
Modify build configs and CI files to check for C++11 support
This commit is contained in:
parent
903724cd03
commit
3bc127eb35
@ -37,7 +37,6 @@ environment:
|
||||
# B2_THREADING: threading=multi,single
|
||||
B2_VARIANT: release
|
||||
B2_FLAGS: testing.execute=off
|
||||
B2_DEFINES: BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING
|
||||
|
||||
matrix:
|
||||
- FLAVOR: Visual Studio 2008, 2010, 2012
|
||||
|
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -30,7 +30,6 @@ env:
|
||||
B2_CI_VERSION: 1
|
||||
B2_VARIANT: debug,release
|
||||
B2_LINK: shared,static
|
||||
B2_DEFINES: BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING
|
||||
LCOV_BRANCH_COVERAGE: 0
|
||||
CODECOV_NAME: Github Actions
|
||||
|
||||
|
@ -36,6 +36,7 @@ add_library(boost_locale
|
||||
add_library(Boost::locale ALIAS boost_locale)
|
||||
|
||||
target_include_directories(boost_locale PUBLIC include PRIVATE src)
|
||||
target_compile_features(boost_locale PUBLIC cxx_std_11)
|
||||
|
||||
target_link_libraries(boost_locale
|
||||
PUBLIC
|
||||
|
@ -5,6 +5,7 @@
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt.
|
||||
|
||||
import config : requires ;
|
||||
import configure ;
|
||||
import feature ;
|
||||
import os ;
|
||||
@ -411,6 +412,19 @@ rule configure-flags ( properties * )
|
||||
|
||||
alias build_flags : : : : <conditional>@configure-flags ;
|
||||
|
||||
local cxx_requirements = [ requires
|
||||
cxx11_auto_declarations
|
||||
cxx11_defaulted_functions
|
||||
cxx11_defaulted_moves
|
||||
cxx11_hdr_functional
|
||||
cxx11_hdr_type_traits
|
||||
cxx11_noexcept
|
||||
cxx11_override
|
||||
cxx11_rvalue_references
|
||||
cxx11_smart_ptr
|
||||
cxx11_static_assert
|
||||
] ;
|
||||
|
||||
boost-lib locale
|
||||
:
|
||||
encoding/codepage.cpp
|
||||
@ -427,6 +441,7 @@ boost-lib locale
|
||||
util/info.cpp
|
||||
util/locale_data.cpp
|
||||
:
|
||||
$(cxx_requirements)
|
||||
# Don't link explicitly, not required
|
||||
<define>BOOST_THREAD_NO_LIB=1
|
||||
<include>$(TOP)/src
|
||||
@ -436,4 +451,5 @@ boost-lib locale
|
||||
<toolset>clang:<cxxflags>"-Wno-long-long -Wno-deprecated-declarations"
|
||||
# Meanwhile remove this
|
||||
<conditional>@configure
|
||||
: : $(cxx_requirements)
|
||||
;
|
||||
|
@ -8,6 +8,8 @@
|
||||
/*!
|
||||
\page changelog Changelog
|
||||
|
||||
- 1.81.0
|
||||
- Require C++11 or higher
|
||||
- 1.80.0
|
||||
- Deprecated support for C++03 and earlier, C++11 will be required in the next release
|
||||
- Provide `-sICU_LINK_LOCALE` as a temporary replacement for `-sICU_LINK` which is incompatible with Boost.Regex.
|
||||
@ -19,7 +21,7 @@
|
||||
- Fix build failures due to missing includes
|
||||
- Handle or suppress many warnings which makes the build log cleaner
|
||||
- 1.67.0
|
||||
- Added support of unique_ptr interface in addition to C++2003 auto_ptr - in order to support C++2017, now you can use BOOST_LOCALE_HIDE_AUTO_PTR definiton to remove auto_ptr from the interfaces and prevent deprecated watnings
|
||||
- Added support of unique_ptr interface in addition to C++2003 auto_ptr - in order to support C++2017, now you can use BOOST_LOCALE_HIDE_AUTO_PTR definition to remove auto_ptr from the interfaces and prevent deprecated watnings
|
||||
- Fixed test problem with ICU >60.1
|
||||
- Fix of solaris build
|
||||
- Fixed wired FreeBSD/clang issue on optimized build. Probably compiler workaround
|
||||
|
@ -46,13 +46,9 @@
|
||||
#define BOOST_LOCALE_USE_AUTO_PTR 1
|
||||
#endif
|
||||
|
||||
// Check for C++11 features that will be used in Boost 1.81
|
||||
// If you are using Boost.Locale and REALLY require it to keep
|
||||
// supporting C++03/C++98 please comment with a detailed description
|
||||
// of your use case and reasoning why using C++11 is not possible in
|
||||
// https://github.com/boostorg/locale/issues/90
|
||||
#if !defined(BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING) && ( \
|
||||
defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
|
||||
// Check for some C++11 features to provide easier checks for what is missing
|
||||
// shortly after the requirement of C++11 in Boost 1.81
|
||||
#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
|
||||
defined(BOOST_NO_CXX11_DEFAULTED_MOVES) || \
|
||||
defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || \
|
||||
defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || \
|
||||
@ -60,11 +56,8 @@
|
||||
defined(BOOST_NO_CXX11_OVERRIDE) || \
|
||||
defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
||||
defined(BOOST_NO_CXX11_SMART_PTR) || \
|
||||
defined(BOOST_NO_CXX11_STATIC_ASSERT) \
|
||||
)
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Locale support for C++03 is deprecated. C++11 will be required from Boost 1.81 onwards.")
|
||||
BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING to suppress this message.")
|
||||
defined(BOOST_NO_CXX11_STATIC_ASSERT)
|
||||
#error "Boost.Locale requires C++11 since Boost 1.81."
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
@ -12,5 +12,5 @@
|
||||
"Artyom Beilis <artyomtnk -at- yahoo.com>",
|
||||
"Alexander Grund <alex -at- grundis.de>"
|
||||
],
|
||||
"cxxstd": "03"
|
||||
"cxxstd": "11"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user