diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 33bd6bd470..6a87cfbd7d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -37,7 +37,7 @@ if(MINGW) # https://github.com/boostorg/build/issues/301 hunter_default_version(Boost VERSION 1.64.0) else() - hunter_default_version(Boost VERSION 1.80.0) + hunter_default_version(Boost VERSION 1.81.0) endif() hunter_default_version(BoostCompute VERSION 0.5-p0) diff --git a/cmake/modules/hunter_get_boost_libs.cmake b/cmake/modules/hunter_get_boost_libs.cmake index f51ef2f9ba..ec804d17d1 100644 --- a/cmake/modules/hunter_get_boost_libs.cmake +++ b/cmake/modules/hunter_get_boost_libs.cmake @@ -84,6 +84,7 @@ function(hunter_get_boost_libs) hunter_append_component(${common_args} COMPONENT thread SINCE 1.25.0) hunter_append_component(${common_args} COMPONENT timer SINCE 1.9.0) hunter_append_component(${common_args} COMPONENT type_erasure SINCE 1.60.0) + hunter_append_component(${common_args} COMPONENT url SINCE 1.81.0) hunter_append_component(${common_args} COMPONENT wave SINCE 1.33.0) # DOCUMENTATION_END } diff --git a/cmake/projects/Boost/ci/matrix.json b/cmake/projects/Boost/ci/matrix.json index 9d93dda9f8..cc1d0ca365 100644 --- a/cmake/projects/Boost/ci/matrix.json +++ b/cmake/projects/Boost/ci/matrix.json @@ -233,6 +233,20 @@ { "example": "Boost-thread", "toolchain": "nmake-vs-16-2019-win64-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, // { "example": "Boost-thread", "toolchain": "vs-16-2019-win64-sdk-10-0-18362-0-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, { "example": "Boost-thread", "toolchain": "mingw-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, -{ "example": "Boost-thread", "toolchain": "msys-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" } +{ "example": "Boost-thread", "toolchain": "msys-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, + +// { "example": "Boost-url", "toolchain": "clang-cxx17", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" }, +{ "example": "Boost-url", "toolchain": "gcc-7-cxx17", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" }, +// { "example": "Boost-url", "toolchain": "gcc-8-cxx17-fpic", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" }, +// { "example": "Boost-url", "toolchain": "gcc-9-cxx17-fpic", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" }, +{ "example": "Boost-url", "toolchain": "android-ndk-r17-api-24-arm64-v8a-clang-libcxx14", "os": "ubuntu-20.04", "python": "3.8", "script": "build.sh" }, +// { "example": "Boost-url", "toolchain": "osx-10-15-make-cxx14", "os": "macos-10.15", "python": "3.8", "script": "build.sh" }, +// { "example": "Boost-url", "toolchain": "osx-12-3-arch-universal2-cxx17", "os": "macos-12", "python": "3.8", "script": "build.sh" }, +{ "example": "Boost-url", "toolchain": "ios-nocodesign-15-5-arm64-cxx17", "os": "macos-12", "python": "3.8", "script": "build.sh" }, +// { "example": "Boost-url", "toolchain": "ninja-vs-16-2019-win64-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, +{ "example": "Boost-url", "toolchain": "nmake-vs-16-2019-win64-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, +// { "example": "Boost-url", "toolchain": "vs-16-2019-win64-sdk-10-0-18362-0-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, +{ "example": "Boost-url", "toolchain": "mingw-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" }, +{ "example": "Boost-url", "toolchain": "msys-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" } ] diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index f4db58cde7..e63558079e 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -256,6 +256,17 @@ hunter_add_version( 5463e5380ccd1564e57747969c9dcc852b82b237 ) +hunter_add_version( + PACKAGE_NAME + Boost + VERSION + "1.81.0" + URL + "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.7z" + SHA1 + 90bef80787606e1f4022a877073b2346636fdba3 +) + # up until 1.63 sourcefourge was used, base url https://downloads.sourceforge.net/project/boost/boost hunter_add_version( PACKAGE_NAME diff --git a/cmake/projects/Boost/url/hunter.cmake b/cmake/projects/Boost/url/hunter.cmake new file mode 100644 index 0000000000..ed6c6deabc --- /dev/null +++ b/cmake/projects/Boost/url/hunter.cmake @@ -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 + url + PACKAGE_INTERNAL_DEPS_ID "50" +) diff --git a/examples/Boost-url/CMakeLists.txt b/examples/Boost-url/CMakeLists.txt new file mode 100644 index 0000000000..cbcf160441 --- /dev/null +++ b/examples/Boost-url/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2013, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +set(Boost_DEBUG ON CACHE BOOLEAN "") + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-boost) + +hunter_add_package(Boost COMPONENTS url) +find_package(Boost CONFIG REQUIRED url) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC Boost::url) diff --git a/examples/Boost-url/foo.cpp b/examples/Boost-url/foo.cpp new file mode 100644 index 0000000000..04f49c43d0 --- /dev/null +++ b/examples/Boost-url/foo.cpp @@ -0,0 +1,35 @@ + +#include +#include + +using namespace boost::urls; + +int main() { + // example taken from here: https://www.boost.org/doc/libs/1_81_0/libs/url/doc/html/url/overview.html#url.overview.quick_look.accessing + url_view u( "https://user:pass@example.com:443/path/to/my%2dfile.txt?id=42&name=John%20Doe+Jingleheimer%2DSchmidt#page%20anchor" ); + + assert(u.scheme() == "https"); + assert(u.authority().buffer() == "user:pass@example.com:443"); + assert(u.userinfo() == "user:pass"); + assert(u.user() == "user"); + assert(u.password() == "pass"); + assert(u.host() == "example.com"); + assert(u.port() == "443"); + assert(u.path() == "/path/to/my-file.txt"); + assert(u.query() == "id=42&name=John Doe+Jingleheimer-Schmidt"); + assert(u.fragment() == "page anchor"); + + std::cout << + "url : " << u << "\n" + "scheme : " << u.scheme() << "\n" + "authority : " << u.encoded_authority() << "\n" + "userinfo : " << u.encoded_userinfo() << "\n" + "user : " << u.encoded_user() << "\n" + "password : " << u.encoded_password() << "\n" + "host : " << u.encoded_host() << "\n" + "port : " << u.port() << "\n" + "path : " << u.encoded_path() << "\n" + "query : " << u.encoded_query() << "\n" + "fragment : " << u.encoded_fragment() << "\n"; + +}