Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Boost to 1.84.0, 1.85.0 and 1.86.0 #775

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update libraries and tests for Boost v1.85.0
* Add example for Boost::charconv
* Add Boost::charconv to test matrix
tnixeu committed Feb 20, 2025
commit 9919117eef38c615d93fdea69a1b546d446b705b
1 change: 1 addition & 0 deletions cmake/modules/hunter_get_boost_libs.cmake
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ function(hunter_get_boost_libs)
# DOCUMENTATION_START {
hunter_append_component(${common_args} COMPONENT atomic SINCE 1.53.0)
hunter_append_component(${common_args} COMPONENT chrono SINCE 1.47.0)
hunter_append_component(${common_args} COMPONENT charconv SINCE 1.85.0)
hunter_append_component(${common_args} COMPONENT cobalt SINCE 1.84.0)
hunter_append_component(${common_args} COMPONENT container SINCE 1.56.0)
hunter_append_component(${common_args} COMPONENT context SINCE 1.51.0)
22 changes: 22 additions & 0 deletions cmake/projects/Boost/charconv/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2013, Ruslan Baratov
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_download)
include(hunter_pick_scheme)

hunter_pick_scheme(
DEFAULT
url_sha1_boost_library
IPHONEOS
url_sha1_boost_ios_library
)

hunter_download(
PACKAGE_NAME
Boost
PACKAGE_COMPONENT
charconv
PACKAGE_INTERNAL_DEPS_ID "50"
)
13 changes: 13 additions & 0 deletions cmake/projects/Boost/ci/matrix.json
Original file line number Diff line number Diff line change
@@ -46,6 +46,19 @@
{ "example": "Boost-chrono-useBoostConfig", "toolchain": "mingw-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },
{ "example": "Boost-chrono-useBoostConfig", "toolchain": "msys-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },

// { "example": "Boost-charconv", "toolchain": "clang-cxx17", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
{ "example": "Boost-charconv", "toolchain": "gcc-7-cxx17", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
// { "example": "Boost-charconv", "toolchain": "gcc-8-cxx17-fpic", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
// { "example": "Boost-charconv", "toolchain": "gcc-9-cxx17-fpic", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
{ "example": "Boost-charconv", "toolchain": "android-ndk-r17-api-24-arm64-v8a-clang-libcxx14", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
// { "example": "Boost-charconv", "toolchain": "osx-12-3-arch-universal2-cxx17", "os": "macos-12", "python": "3.8", "script": "build.sh" },
{ "example": "Boost-charconv", "toolchain": "ios-nocodesign-15-5-arm64-cxx17", "os": "macos-12", "python": "3.8", "script": "build.sh" },
// { "example": "Boost-charconv", "toolchain": "ninja-vs-16-2019-win64-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },
//{ "example": "Boost-charconv", "toolchain": "nmake-vs-16-2019-win64-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },
// { "example": "Boost-charconv", "toolchain": "vs-16-2019-win64-sdk-10-0-18362-0-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },
//{ "example": "Boost-charconv", "toolchain": "mingw-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },
//{ "example": "Boost-charconv", "toolchain": "msys-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },

{ "example": "Boost-cobalt", "toolchain": "clang-cxx17", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
//{ "example": "Boost-cobalt", "toolchain": "gcc-7-cxx17", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
// { "example": "Boost-cobalt", "toolchain": "gcc-8-cxx17-fpic", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" },
1 change: 1 addition & 0 deletions cmake/projects/Boost/generate.sh
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
BOOST_LIBS="
atomic
chrono
charconv
cobalt
container
context
18 changes: 18 additions & 0 deletions examples/Boost-charconv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2013, Ruslan Baratov
# All rights reserved.

cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(Boost_DEBUG ON CACHE BOOLEAN "")
set(TESTING_CONFIG_OPT FILEPATH ${CMAKE_CURRENT_LIST_DIR}/../Boost-useBoostConfig/config.cmake)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-boost)
hunter_add_package(Boost COMPONENTS charconv)
find_package(Boost CONFIG REQUIRED charconv)

add_executable(foo foo.cpp)
target_link_libraries(foo PUBLIC Boost::charconv)
21 changes: 21 additions & 0 deletions examples/Boost-charconv/foo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2022 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

// https://github.com/boostorg/charconv/blob/develop/test/quick.cpp

#if defined(__GNUC__) && __GNUC__ == 11
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

#include <boost/charconv.hpp>

int main()
{
char buffer[ 32 ];
auto r = boost::charconv::to_chars( buffer, buffer + sizeof( buffer ), 1048576 );

int v = 0;
boost::charconv::from_chars( buffer, r.ptr, v );
}