From 683d8733cc297e21646903d20c7dd8ffd2ab428a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 20 Jun 2023 09:43:17 +0200 Subject: [PATCH 1/7] Add FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..5933e5ac --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: Flamefire From 149ee7c84e13d8949f6b8866cd1d33741014c371 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 21 Jun 2023 16:58:23 +0200 Subject: [PATCH 2/7] Fix false positive warning in GCC 13 on MinGW --- test/test_codecvt.cpp | 8 ++++++++ test/test_filebuf.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index a18ce00f..ff5dbdbf 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -293,7 +293,15 @@ void test_codecvt_err() TEST_EQ(cvt.in(mb, from, from_end, from_next, to, to_end, to_next), cvt_type::partial); TEST(from_next == from + 1); TEST(to_next == to + 1); + // False positive in GCC 13 in MinGW +#if defined(__GNUC__) && __GNUC__ >= 13 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfree-nonheap-object" +#endif TEST(std::wstring(to, to_next) == std::wstring(L"1")); +#if defined(__GNUC__) && __GNUC__ >= 13 +#pragma GCC diagnostic pop +#endif } { char buf[4] = {}; diff --git a/test/test_filebuf.cpp b/test/test_filebuf.cpp index a56c87db..88ff9aa6 100644 --- a/test/test_filebuf.cpp +++ b/test/test_filebuf.cpp @@ -308,7 +308,7 @@ void test_xsgetn(const std::string& filepath, bool binary) buffer[0] = origStr[0]; TEST_EQ(buf.sgetn(&str[0], 0), 0); -#if defined(__GNUC__) && __GNUC__ >= 7 +#if defined(__GNUC__) && __GNUC__ >= 12 // GCC may not detect that the negative value is checked by xsgetn #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wrestrict" From 8bfeeb320de46a33e788313d439ca74b07dfa015 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 22 Jun 2023 12:52:26 +0200 Subject: [PATCH 3/7] CI: Fix AzP --- .azure-pipelines.yml | 73 +++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 45 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 57b9acb7..3d1cc401 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -5,21 +5,6 @@ # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt -# -# Generic Azure Pipelines build script for boostorg repositories -# See: https://github.com/boostorg/boost-ci/ -# -# Instructions for customizing this script for your library: -# -# 1. Customize the compilers and language levels you want. -# 2. If you have more than include/, src/, test/, example/, examples/, -# benchmark/ or tools/ directories, set the environment variable DEPINST. -# For example if your build uses code in "bench/" and "fog/" directories: -# - DEPINST: --include bench --include fog -# 3. Enable pull request builds in your boostorg/ account. -# -# That's it - the script will do everything else for you. - trigger: branches: include: @@ -44,44 +29,42 @@ parameters: - name: jobs type: object default: - - { compiler: gcc-4.8, cxxstd: '11', os: ubuntu-18.04 } - - { compiler: gcc-4.9, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: gcc-5, cxxstd: '11', os: ubuntu-18.04 } - - { compiler: gcc-6, cxxstd: '11,14', os: ubuntu-18.04 } - - { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-18.04 } + - { compiler: gcc-4.8, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.9, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: gcc-5, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:18.04' } + - { compiler: gcc-6, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:18.04' } + - { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-20.04 } - { compiler: gcc-8, cxxstd: '14,17,2a', os: ubuntu-20.04 } - { compiler: gcc-9, cxxstd: '14,17,2a', os: ubuntu-20.04 } - { compiler: gcc-10, cxxstd: '14,17,20', os: ubuntu-20.04 } - { compiler: gcc-11, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: clang-3.5, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.6, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.7, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-18.04 } - - { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-18.04 } - - { compiler: clang-5.0, cxxstd: '11,14,17', os: ubuntu-18.04 } - - { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-18.04, install: 'clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev' } - - { compiler: clang-7, cxxstd: '14,17', os: ubuntu-18.04, install: 'clang-7 libc6-dbg libc++-dev libstdc++-8-dev' } - - { compiler: clang-8, cxxstd: '14,17', os: ubuntu-18.04, install: 'clang-8 libc6-dbg libc++-dev libstdc++-8-dev' } + - { compiler: clang-3.5, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.6, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.7, cxxstd: '11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-5.0, cxxstd: '11,14,17', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-20.04 } + - { compiler: clang-7, cxxstd: '14,17', os: ubuntu-20.04 } + - { compiler: clang-8, cxxstd: '14,17', os: ubuntu-20.04 } - { compiler: clang-9, cxxstd: '14,17,2a', os: ubuntu-20.04 } - { compiler: clang-10, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: clang-11, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: clang-12, cxxstd: '14,17,20', os: ubuntu-20.04 } + - { compiler: clang-11, cxxstd: '14,17,20', os: ubuntu-22.04 } + - { compiler: clang-12, cxxstd: '14,17,20', os: ubuntu-22.04 } - { name: Linux_clang_6_libcxx, - compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-18.04, install: 'clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev', env: {B2_STDLIB: libc++ } } + compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-20.04, container: 'ubuntu:18.04', install: 'clang-6.0 libc++-dev libc++abi-dev', env: {B2_STDLIB: libc++ } } # OSX - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.2.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.3 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.3.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.4.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.5 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.6 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.7 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.0.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.1.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.2 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.3 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.4 } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '11.7' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '12.4' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '12.5.1' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-11, xcode: '13.0' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.1' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.2.1' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.3.1' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.4' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '13.4.1' } + - { compiler: clang, cxxstd: '14,17,2a', os: macOS-12, xcode: '14.0.1' } stages: - stage: Test From 6ec7524a351839122254230c60fe39e40763d41d Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 22 Jun 2023 13:02:18 +0200 Subject: [PATCH 4/7] CI: Update GHA container jobs Use Ubuntu 22.04 as the base OS --- .github/workflows/ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4debc399..9296b70b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,16 +44,16 @@ jobs: matrix: include: # Linux, gcc - - { compiler: gcc-4.4, cxxstd: '98,0x', os: ubuntu-20.04, container: 'ubuntu:16.04' } - - { compiler: gcc-4.6, cxxstd: '03,0x', os: ubuntu-20.04, container: 'ubuntu:16.04' } - - { compiler: gcc-4.7, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' } - - { compiler: gcc-4.8, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:18.04' } - - { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.4, cxxstd: '98,0x', os: ubuntu-22.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.6, cxxstd: '03,0x', os: ubuntu-22.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.7, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.8, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' } - { compiler: gcc-5, cxxstd: '03,11,14,1z', os: ubuntu-22.04, container: 'ubuntu:18.04' } - { compiler: gcc-6, cxxstd: '03,11,14,17', os: ubuntu-22.04, container: 'ubuntu:18.04' } - - { compiler: gcc-7, cxxstd: '03,11,14,17', os: ubuntu-22.04, container: 'ubuntu:18.04' } - - { compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-22.04, container: 'ubuntu:18.04' } - - { compiler: gcc-9, cxxstd: '03,11,14,17,2a', os: ubuntu-22.04, container: 'ubuntu:18.04' } + - { compiler: gcc-7, cxxstd: '03,11,14,17', os: ubuntu-20.04 } + - { compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04 } + - { compiler: gcc-9, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04 } - { compiler: gcc-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } - { compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } - { compiler: gcc-12, cxxstd: '03,11,14,17,20', os: ubuntu-22.04 } @@ -63,10 +63,10 @@ jobs: compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04, install: 'g++-8-multilib', address-model: '32,64' } # Linux, clang - - { compiler: clang-3.5, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.6, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.7, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.8, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.5, cxxstd: '03,11', os: ubuntu-22.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.6, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.7, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.8, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:16.04' } - { compiler: clang-3.9, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:18.04' } - { compiler: clang-4.0, cxxstd: '03,11,14', os: ubuntu-22.04, container: 'ubuntu:18.04' } - { compiler: clang-5.0, cxxstd: '03,11,14,1z', os: ubuntu-22.04, container: 'ubuntu:18.04' } @@ -88,7 +88,7 @@ jobs: compiler: clang-14, cxxstd: '03,11,14,17,20', os: ubuntu-22.04, stdlib: libc++, install: 'clang-14 libc++-14-dev libc++abi-14-dev' } # OSX, clang - - { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-10.15, sanitize: yes } + - { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-11, sanitize: yes } timeout-minutes: 120 runs-on: ${{matrix.os}} From af2b3f5af735858f7219b067a62b3781cc0d97f6 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 22 Jun 2023 16:08:32 +0200 Subject: [PATCH 5/7] Fix duplicated PRIVATE in CML --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5dab7577..56f5fdc3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,7 +6,7 @@ include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wsuggest-override _BOOST_NOWIDE_SUGGEST_OVERRIDE_SUPPORTED) add_library(boost_nowide_file_test_helpers STATIC file_test_helpers.cpp) -target_link_libraries(boost_nowide_file_test_helpers PRIVATE PRIVATE Boost::nowide) +target_link_libraries(boost_nowide_file_test_helpers PRIVATE Boost::nowide) target_compile_definitions(boost_nowide_file_test_helpers PRIVATE BOOST_ALL_NO_LIB) if(NOT TARGET tests) From 2c40bddb30ad98274d2440b9b17fff9d44ef5678 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 9 Mar 2022 19:22:21 +0100 Subject: [PATCH 6/7] Reduce duplicated requirements from Jamfiles --- build/Jamfile.v2 | 1 - test/Jamfile.v2 | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 0eab1694..fdb27ec2 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -26,7 +26,6 @@ project boost/nowide cxx11_rvalue_references cxx11_static_assert ] - [ check-target-builds ../config//cxx11_moveable_fstreams "std::fstream is moveable and swappable" : : no ] [ check-target-builds ../config//lfs_support "Has Large File Support" : : BOOST_NOWIDE_NO_LFS ] no:BOOST_NOWIDE_NO_LFS [ check-target-builds ../config//attribute_init_priority "Has attribute init_priority" : BOOST_NOWIDE_HAS_INIT_PRIORITY ] : usage-requirements $(requirements) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9cdaac86..f632ed58 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -23,17 +23,12 @@ project : requirements . pedantic on - [ requires - cxx11_defaulted_functions - cxx11_noexcept - cxx11_rvalue_references - cxx11_static_assert - ] [ check-target-builds ../config//cxx11_moveable_fstreams "std::fstream is moveable and swappable" : : no ] ; lib shell32 ; lib file_test_helpers : file_test_helpers.cpp : static -/boost/nowide//boost_nowide ; +explicit file_test_helpers ; run test_codecvt.cpp ; run test_convert.cpp ; From f20b831c62a9fe659a0ef9cee2f2bfe3704c4377 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 16 Mar 2022 18:16:56 +0100 Subject: [PATCH 7/7] Add some missing C++11 requirements --- build/Jamfile.v2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index fdb27ec2..8ea6ae74 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -21,10 +21,19 @@ project boost/nowide : source-location ../src : requirements $(requirements) [ requires + cxx11_auto_declarations + cxx11_char16_t + cxx11_char32_t + cxx11_constexpr + cxx11_decltype cxx11_defaulted_functions cxx11_noexcept + cxx11_nullptr + cxx11_override cxx11_rvalue_references cxx11_static_assert + cxx11_template_aliases + cxx11_variadic_templates ] [ check-target-builds ../config//lfs_support "Has Large File Support" : : BOOST_NOWIDE_NO_LFS ] no:BOOST_NOWIDE_NO_LFS [ check-target-builds ../config//attribute_init_priority "Has attribute init_priority" : BOOST_NOWIDE_HAS_INIT_PRIORITY ]