Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/boost-original/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
GerHobbelt committed Feb 25, 2024
2 parents 0dff419 + bbbef97 commit 50e3b3f
Show file tree
Hide file tree
Showing 162 changed files with 84,040 additions and 1,710 deletions.
667 changes: 2 additions & 665 deletions .drone.star

Large diffs are not rendered by default.

260 changes: 147 additions & 113 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ set(__ignore__ ${CMAKE_C_COMPILER})
# Options
#
#-------------------------------------------------
option(BOOST_URL_BUILD_TESTS "Build boost::url tests" ${BUILD_TESTING})
option(BOOST_URL_BUILD_TESTS "Build boost::url tests even if BUILD_TESTING is OFF" OFF)
option(BOOST_URL_BUILD_FUZZERS "Build boost::url fuzzers" OFF)
option(BOOST_URL_BUILD_EXAMPLES "Build boost::url examples" ${BOOST_URL_IS_ROOT})
option(BOOST_URL_DISABLE_THREADS "Disable threads" OFF)
option(BOOST_URL_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)
set(BOOST_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.." CACHE STRING "Boost source dir to use when running CMake from this directory")

#-------------------------------------------------
Expand Down Expand Up @@ -62,7 +63,7 @@ foreach (BOOST_URL_DEPENDENCY ${BOOST_URL_DEPENDENCIES})
endif ()
endforeach ()
# Conditional dependencies
if (BOOST_URL_BUILD_TESTS)
if (BUILD_TESTING OR BOOST_URL_BUILD_TESTS)
set(BOOST_URL_UNIT_TEST_LIBRARIES container filesystem unordered)
endif()
if (BOOST_URL_BUILD_EXAMPLES)
Expand All @@ -77,7 +78,7 @@ set(BOOST_EXCLUDE_LIBRARIES url)
# Add Boost Subdirectory
#
#-------------------------------------------------
if (NOT BOOST_SUPERPROJECT_VERSION)
if (BOOST_URL_IS_ROOT)
set(CMAKE_FOLDER Dependencies)
# Find absolute BOOST_SRC_DIR
if (NOT IS_ABSOLUTE ${BOOST_SRC_DIR})
Expand All @@ -96,13 +97,18 @@ if (NOT BOOST_SUPERPROJECT_VERSION)

# Create Boost interface targets
if (BOOST_SRC_DIR_IS_VALID)
# From BOOST_SRC_DIR
if (BUILD_SHARED_LIBS)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
endif()
set(BOOST_EXCLUDE_LIBRARIES ${PROJECT_NAME})
set(PREV_BUILD_TESTING ${BUILD_TESTING})
set(BUILD_TESTING OFF CACHE BOOL "Build the tests." FORCE)
add_subdirectory(${BOOST_SRC_DIR} Dependencies/boost EXCLUDE_FROM_ALL)
set(BUILD_TESTING ${PREV_BUILD_TESTING} CACHE BOOL "Build the tests." FORCE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${BOOST_SRC_DIR}/tools/cmake/include")
else ()
# From Boost Package
find_package(Boost REQUIRED COMPONENTS container)
foreach (BOOST_INCLUDE_LIBRARY ${BOOST_INCLUDE_LIBRARIES})
if (NOT TARGET Boost::${BOOST_INCLUDE_LIBRARY})
Expand Down Expand Up @@ -133,6 +139,7 @@ function(boost_url_setup_properties target)
target_link_libraries(${target} PUBLIC ${BOOST_URL_DEPENDENCIES})
target_compile_definitions(${target} PUBLIC $<IF:$<BOOL:${BUILD_SHARED_LIBS}>,BOOST_URL_DYN_LINK=1,BOOST_URL_STATIC_LINK=1>)
target_compile_definitions(${target} PRIVATE BOOST_URL_SOURCE)
target_compile_options(${target} PUBLIC $<$<CXX_COMPILER_ID:MSVC>:/EHsc>)
endfunction()
add_library(boost_url ${BOOST_URL_HEADERS} ${BOOST_URL_SOURCES})
add_library(Boost::url ALIAS boost_url)
Expand All @@ -143,7 +150,7 @@ boost_url_setup_properties(boost_url)
# Tests
#
#-------------------------------------------------
if (BOOST_URL_BUILD_TESTS)
if (BUILD_TESTING OR BOOST_URL_BUILD_TESTS)
if (BOOST_URL_IS_ROOT)
include(CTest)
endif ()
Expand Down
19 changes: 10 additions & 9 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@ https://www.boost.org/doc/libs/master/libs/url/doc/html/[image:https://raw.githu
|===
|Branch |https://github.com/boostorg/url/tree/master[`master`]
|https://github.com/boostorg/url/tree/develop[`develop`]
|Docs

|https://www.boost.org/doc/libs/master/libs/url/doc/html/[Docs]
|https://www.boost.org/doc/libs/master/libs/url/doc/html/[image:https://img.shields.io/badge/docs-master-brightgreen.svg[Documentation]]
|https://www.boost.org/doc/libs/develop/libs/url/doc/html/[image:https://img.shields.io/badge/docs-develop-brightgreen.svg[Documentation]]

|https://github.com/[GitHub Actions]
|https://github.com/boostorg/url/actions/workflows/ci.yml[image:https://github.com/boostorg/url/actions/workflows/ci.yml/badge.svg?branch=master[CI]]
|https://github.com/boostorg/url/actions/workflows/ci.yml[image:https://github.com/boostorg/url/actions/workflows/ci.yml/badge.svg?branch=develop[CI]]

|https://drone.io/[Drone]
|https://drone.cpp.al/boostorg/url[image:https://drone.cpp.al/api/badges/boostorg/url/status.svg?ref=refs/heads/master[Build
Status]]
|https://drone.cpp.al/boostorg/url[image:https://drone.cpp.al/api/badges/boostorg/url/status.svg?ref=refs/heads/develop[Build
Status]]

|https://github.com/[GitHub Actions]
|https://github.com/boostorg/url/actions/workflows/ci.yml[image:https://github.com/boostorg/url/actions/workflows/ci.yml/badge.svg?branch=master[CI]]
|https://github.com/boostorg/url/actions/workflows/ci.yml[image:https://github.com/boostorg/url/actions/workflows/ci.yml/badge.svg?branch=develop[CI]]
|https://www.boost.org/development/tests/master/developer/summary.html[Matrix]
|http://www.boost.org/development/tests/master/developer/url.html[image:https://img.shields.io/badge/matrix-master-brightgreen.svg[Matrix]]
|http://www.boost.org/development/tests/develop/developer/url.html[image:https://img.shields.io/badge/matrix-develop-brightgreen.svg[Matrix]]

|https://codecov.io[codecov.io]
|https://codecov.io[Codecov]
|https://codecov.io/gh/boostorg/url/branch/master[image:https://codecov.io/gh/boostorg/url/branch/master/graph/badge.svg[codecov]]
|https://codecov.io/gh/boostorg/url/branch/develop[image:https://codecov.io/gh/boostorg/url/branch/develop/graph/badge.svg[codecov]]

|Matrix
|http://www.boost.org/development/tests/master/developer/url.html[image:https://img.shields.io/badge/matrix-master-brightgreen.svg[Matrix]]
|http://www.boost.org/development/tests/develop/developer/url.html[image:https://img.shields.io/badge/matrix-develop-brightgreen.svg[Matrix]]
|===

== Boost.URL
Expand Down
3 changes: 0 additions & 3 deletions antora/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions antora/mrdox.yml

This file was deleted.

3 changes: 2 additions & 1 deletion build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ project boost/url
$(c11-requires)
<define>BOOST_URL_SOURCE
<toolset>msvc-14.0:<build>no
<toolset>gcc-7:<cxxflags>"-Wno-maybe-uninitialized" # variant2
# Warnings in dependencies
<toolset>gcc:<cxxflags>"-Wno-maybe-uninitialized"
<toolset>gcc,<target-os>windows:<cxxflags>"-Wno-error=array-bounds"
: common-requirements
<link>shared:<define>BOOST_URL_DYN_LINK=1
Expand Down
2 changes: 2 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ html
temp
out.txt
qbk/reference.qbk
node_modules
build
1 change: 1 addition & 0 deletions doc/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ docca.reference reference.qbk
<doxygen:param>SHOW_FILES=NO
<doxygen:param>SHOW_NAMESPACES=NO
<doxygen:param>CLASS_DIAGRAMS=NO
<doxygen:param>GENERATE_TAGFILE=url.tag.xml

# <doxygen:param>ALLOW_UNICODE_NAMES=NO
# <doxygen:param>GROUP_NESTED_COMPOUNDS=NO
Expand Down
34 changes: 5 additions & 29 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,19 @@
## Instructions for Documentation

There are different possible configurations when building the docs:
Scripts to build the documentation can be found at https://github.com/boostorg/release-tools/tree/master/build_docs

Option 1. Start out with single boost library, such as the one in this repository. A new boost-root directory is generated for you, next to the current repo, (in the location ../boost-root) and the docs are output to ../boost-root/libs/_name-of-this-repo_/doc/html
For example on a Linux system, copy the file `linuxdocs.sh` into the current directory and run it.

or

Option 2. You have already set up boost-root. The repo has already been placed in boost-root/libs/_name-of-this-repo_, and that's where you run the build. In that case, the docs are output in the current directory, such as _name-of-this-repo_/doc/html. The existing boost-root is used.

Either of the above choices are possible. The build scripts detect if they are being run from a boost-root or not.

In order to build the documentation, refer to the appropriate sections below:

## Linux

Run the linuxdocs.sh script which can be found in the doc/tools directory:
```
tools/linuxdocs.sh
./linuxdocs.sh
```


## Mac OSX

Run the osxdocs.sh script which can be found in the doc/tools directory:
```
tools/osxdocs.sh
```

## Windows

Run the powershell script windowsdocs.ps1 which can be found in the doc/tools directory:
```
.\tools\windowsdocs.ps1
```
The QuickBook or AsciiDoc files are compiled into html format.

## Help Card

To edit the Help Card in `HelpCard.org`, use LibreOffice Draw and install the
following fonts:

- [Cairo](https://fonts.google.com/specimen/Cairo)
- [M+ 1M](https://www.fontsquirrel.com/fonts/m-1m)
- [M+ 1M](https://www.fontsquirrel.com/fonts/m-1m)
26 changes: 26 additions & 0 deletions doc/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Copyright (c) 2023 Alan de Freitas ([email protected])
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Official repository: https://github.com/boostorg/url
#

name: url
version: ~
title: Boost.URL
start_page: index.adoc
asciidoc:
attributes:
source-language: asciidoc@
table-caption: false
nav:
- modules/ROOT/nav.adoc
ext:
collector:
run:
command: node doc/generate-files.mjs
scan:
dir: doc/build/generated-files

27 changes: 27 additions & 0 deletions doc/build_antora.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Copyright (c) 2023 Alan de Freitas ([email protected])
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Official repository: https://github.com/boostorg/url
#

if [ $# -eq 0 ]
then
echo "No playbook supplied, using default playbook"
PLAYBOOK="local-playbook.yml"
else
PLAYBOOK=$1
fi

echo "Building documentation with Antora..."
echo "Installing npm dependencies..."
npm ci

echo "Building docs in custom dir..."
PATH="$(pwd)/node_modules/.bin:${PATH}"
export PATH
npx antora --clean --fetch "$PLAYBOOK"
echo "Done"

Loading

0 comments on commit 50e3b3f

Please sign in to comment.