Skip to content

Commit ebe1c28

Browse files
committed
Add zlib service
1 parent 8db5ceb commit ebe1c28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1425
-241
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Distributed under the Boost Software License, Version 1.0. (See accompanying
99
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1010
#
11-
# Official repository: https://github.com/cppalliance/runtime_services/
11+
# Official repository: https://github.com/cppalliance/rts/
1212
#
1313

1414
name: CI
@@ -760,10 +760,10 @@ jobs:
760760
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
761761
ldd /__e/node20/bin/node
762762
763-
- name: Clone Boost.RuntimeServices
763+
- name: Clone Boost.RunTimeServices
764764
uses: actions/checkout@v4
765765
with:
766-
path: runtime_services-root
766+
path: rts-root
767767

768768
- name: Setup C++
769769
uses: alandefreitas/cpp-actions/[email protected]
@@ -790,8 +790,8 @@ jobs:
790790
boost-dir: boost-source
791791
cache: false
792792
modules-exclude-paths: ''
793-
scan-modules-dir: runtime_services-root
794-
scan-modules-ignore: runtime_services
793+
scan-modules-dir: rts-root
794+
scan-modules-ignore: rts
795795

796796
- name: Patch Boost
797797
id: patch
@@ -823,14 +823,14 @@ jobs:
823823
echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT
824824
825825
# Patch boost-root with workspace module
826-
cp -r "$workspace_root"/runtime_services-root "libs/$module"
826+
cp -r "$workspace_root"/rts-root "libs/$module"
827827
828828
- name: Boost B2 Workflow
829829
uses: alandefreitas/cpp-actions/[email protected]
830830
if: ${{ !matrix.coverage && !matrix.time-trace }}
831831
with:
832832
source-dir: boost-root
833-
modules: runtime_services
833+
modules: rts
834834
toolset: ${{ matrix.b2-toolset }}
835835
build-variant: ${{ matrix.build-type }}
836836
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx || '' }}
@@ -868,7 +868,7 @@ jobs:
868868
export-compile-commands: ${{ matrix.time-trace }}
869869
package: false
870870
package-artifact: false
871-
ref-source-dir: boost-root/libs/runtime_services
871+
ref-source-dir: boost-root/libs/rts
872872
toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }}
873873

874874
- name: Set Path
@@ -900,7 +900,7 @@ jobs:
900900
extra-args: |
901901
-D BOOST_CI_INSTALL_TEST=ON
902902
-D CMAKE_PREFIX_PATH=${{ steps.patch.outputs.workspace_root }}/.local
903-
ref-source-dir: boost-root/libs/runtime_services
903+
ref-source-dir: boost-root/libs/rts
904904
trace-commands: true
905905

906906
- name: Subdirectory Integration Workflow
@@ -921,7 +921,7 @@ jobs:
921921
install: false
922922
cmake-version: '>=3.15'
923923
extra-args: -D BOOST_CI_INSTALL_TEST=OFF
924-
ref-source-dir: boost-root/libs/runtime_services/test/cmake_test
924+
ref-source-dir: boost-root/libs/rts/test/cmake_test
925925

926926
- name: Root Project CMake Workflow
927927
uses: alandefreitas/cpp-actions/[email protected]
@@ -951,7 +951,7 @@ jobs:
951951
uses: alandefreitas/cpp-actions/[email protected]
952952
if: matrix.time-trace
953953
with:
954-
source-dir: boost-root/libs/runtime_services
954+
source-dir: boost-root/libs/rts
955955
build-dir: boost-root/__build_cmake_test__
956956
github_token: ${{ secrets.GITHUB_TOKEN }}
957957

@@ -994,7 +994,7 @@ jobs:
994994
timeout-minutes: 120
995995

996996
steps:
997-
- name: Clone Boost.RuntimeServices
997+
- name: Clone Boost.RunTimeServices
998998
uses: actions/checkout@v4
999999
with:
10001000
# Avoid the common API rate limit exceeded error in boostorg by including 100 latest commits in any case
@@ -1028,10 +1028,10 @@ jobs:
10281028
with:
10291029
apt-get: git cmake
10301030

1031-
- name: Clone Boost.RuntimeServices
1031+
- name: Clone Boost.RunTimeServices
10321032
uses: actions/checkout@v4
10331033
with:
1034-
path: runtime_services-root
1034+
path: rts-root
10351035

10361036
- name: Clone Boost
10371037
uses: alandefreitas/cpp-actions/[email protected]
@@ -1041,8 +1041,8 @@ jobs:
10411041
boost-dir: boost-source
10421042
cache: false
10431043
modules-exclude-paths: ''
1044-
scan-modules-dir: runtime_services-root
1045-
scan-modules-ignore: runtime_services
1044+
scan-modules-dir: rts-root
1045+
scan-modules-ignore: rts
10461046

10471047
- name: Patch Boost
10481048
id: patch
@@ -1074,7 +1074,7 @@ jobs:
10741074
echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT
10751075
10761076
# Patch boost-root with workspace module
1077-
cp -r "$workspace_root"/runtime_services-root "libs/$module"
1077+
cp -r "$workspace_root"/rts-root "libs/$module"
10781078
10791079
10801080
- uses: actions/setup-node@v4
@@ -1093,7 +1093,7 @@ jobs:
10931093
10941094
BOOST_SRC_DIR="$(pwd)/boost-root"
10951095
export BOOST_SRC_DIR
1096-
cd boost-root/libs/runtime_services
1096+
cd boost-root/libs/rts
10971097
10981098
cd doc
10991099
bash ./build_antora.sh

CMakeLists.txt

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Distributed under the Boost Software License, Version 1.0. (See accompanying
88
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
99
#
10-
# Official repository: https://github.com/cppalliance/runtime_services
10+
# Official repository: https://github.com/cppalliance/rts
1111
#
1212

1313
#-------------------------------------------------
@@ -16,14 +16,14 @@
1616
#
1717
#-------------------------------------------------
1818
cmake_minimum_required(VERSION 3.8...3.20)
19-
set(BOOST_RUNTIME_SERVICES_VERSION 1)
19+
set(BOOST_RTS_VERSION 1)
2020
if (BOOST_SUPERPROJECT_VERSION)
21-
set(BOOST_RUNTIME_SERVICES_VERSION ${BOOST_SUPERPROJECT_VERSION})
21+
set(BOOST_RTS_VERSION ${BOOST_SUPERPROJECT_VERSION})
2222
endif ()
23-
project(boost_runtime_services VERSION "${BOOST_RUNTIME_SERVICES_VERSION}" LANGUAGES CXX)
24-
set(BOOST_RUNTIME_SERVICES_IS_ROOT OFF)
23+
project(boost_rts VERSION "${BOOST_RTS_VERSION}" LANGUAGES CXX)
24+
set(BOOST_RTS_IS_ROOT OFF)
2525
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
26-
set(BOOST_RUNTIME_SERVICES_IS_ROOT ON)
26+
set(BOOST_RTS_IS_ROOT ON)
2727
endif ()
2828
set(__ignore__ ${CMAKE_C_COMPILER})
2929

@@ -32,11 +32,11 @@ set(__ignore__ ${CMAKE_C_COMPILER})
3232
# Options
3333
#
3434
#-------------------------------------------------
35-
if (BOOST_RUNTIME_SERVICES_IS_ROOT)
35+
if (BOOST_RTS_IS_ROOT)
3636
include(CTest)
3737
endif ()
38-
option(BOOST_RUNTIME_SERVICES_BUILD_TESTS "Build boost::runtime_services tests" ${BUILD_TESTING})
39-
option(BOOST_RUNTIME_SERVICES_BUILD_EXAMPLES "Build boost::runtime_services examples" ${BOOST_RUNTIME_SERVICES_IS_ROOT})
38+
option(BOOST_RTS_BUILD_TESTS "Build boost::rts tests" ${BUILD_TESTING})
39+
option(BOOST_RTS_BUILD_EXAMPLES "Build boost::rts examples" ${BOOST_RTS_IS_ROOT})
4040

4141

4242
# Check if environment variable BOOST_SRC_DIR is set
@@ -53,36 +53,37 @@ set(BOOST_SRC_DIR ${DEFAULT_BOOST_SRC_DIR} CACHE STRING "Boost source dir to use
5353
#
5454
#-------------------------------------------------
5555
# The boost super-project requires one explicit dependency per-line.
56-
set(BOOST_RUNTIME_SERVICES_DEPENDENCIES
56+
set(BOOST_RTS_DEPENDENCIES
5757
Boost::config
5858
Boost::container_hash
5959
Boost::core
6060
Boost::mp11
61+
Boost::system
6162
Boost::throw_exception
6263
)
6364

64-
foreach (BOOST_RUNTIME_SERVICES_DEPENDENCY ${BOOST_RUNTIME_SERVICES_DEPENDENCIES})
65-
if (BOOST_RUNTIME_SERVICES_DEPENDENCY MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$")
66-
list(APPEND BOOST_RUNTIME_SERVICES_INCLUDE_LIBRARIES ${CMAKE_MATCH_1})
65+
foreach (BOOST_RTS_DEPENDENCY ${BOOST_RTS_DEPENDENCIES})
66+
if (BOOST_RTS_DEPENDENCY MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$")
67+
list(APPEND BOOST_RTS_INCLUDE_LIBRARIES ${CMAKE_MATCH_1})
6768
endif ()
6869
endforeach ()
6970
# Conditional dependencies
70-
if (BOOST_RUNTIME_SERVICES_BUILD_TESTS)
71-
set(BOOST_RUNTIME_SERVICES_UNIT_TEST_LIBRARIES url)
71+
if (BOOST_RTS_BUILD_TESTS)
72+
set(BOOST_RTS_UNIT_TEST_LIBRARIES url)
7273
endif ()
73-
if (BOOST_RUNTIME_SERVICES_BUILD_EXAMPLES)
74-
# set(BOOST_RUNTIME_SERVICES_EXAMPLE_LIBRARIES url)
74+
if (BOOST_RTS_BUILD_EXAMPLES)
75+
# set(BOOST_RTS_EXAMPLE_LIBRARIES url)
7576
endif ()
7677
# Complete dependency list
77-
set(BOOST_INCLUDE_LIBRARIES ${BOOST_RUNTIME_SERVICES_INCLUDE_LIBRARIES} ${BOOST_RUNTIME_SERVICES_UNIT_TEST_LIBRARIES} ${BOOST_RUNTIME_SERVICES_EXAMPLE_LIBRARIES})
78-
set(BOOST_EXCLUDE_LIBRARIES runtime_services)
78+
set(BOOST_INCLUDE_LIBRARIES ${BOOST_RTS_INCLUDE_LIBRARIES} ${BOOST_RTS_UNIT_TEST_LIBRARIES} ${BOOST_RTS_EXAMPLE_LIBRARIES})
79+
set(BOOST_EXCLUDE_LIBRARIES rts)
7980

8081
#-------------------------------------------------
8182
#
8283
# Add Boost Subdirectory
8384
#
8485
#-------------------------------------------------
85-
if (BOOST_RUNTIME_SERVICES_IS_ROOT)
86+
if (BOOST_RTS_IS_ROOT)
8687
set(CMAKE_FOLDER Dependencies)
8788
# Find absolute BOOST_SRC_DIR
8889
if (NOT IS_ABSOLUTE ${BOOST_SRC_DIR})
@@ -130,31 +131,46 @@ endif ()
130131
#-------------------------------------------------
131132
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
132133

133-
file(GLOB_RECURSE BOOST_RUNTIME_SERVICES_HEADERS CONFIGURE_DEPENDS include/boost/*.hpp include/boost/*.natvis)
134-
file(GLOB_RECURSE BOOST_RUNTIME_SERVICES_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp)
134+
file(GLOB_RECURSE BOOST_RTS_HEADERS CONFIGURE_DEPENDS include/boost/*.hpp include/boost/*.natvis)
135+
file(GLOB_RECURSE BOOST_RTS_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp)
135136

136-
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost PREFIX "" FILES ${BOOST_RUNTIME_SERVICES_HEADERS})
137-
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "runtime_services" FILES ${BOOST_RUNTIME_SERVICES_SOURCES})
137+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost/rts PREFIX "include" FILES ${BOOST_RTS_HEADERS})
138+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "src" FILES ${BOOST_RTS_SOURCES})
138139

139-
add_library(boost_runtime_services ${BOOST_RUNTIME_SERVICES_HEADERS} ${BOOST_RUNTIME_SERVICES_SOURCES})
140-
add_library(Boost::runtime_services ALIAS boost_runtime_services)
141-
target_compile_features(boost_runtime_services PUBLIC cxx_constexpr)
142-
target_include_directories(boost_runtime_services PUBLIC "${PROJECT_SOURCE_DIR}/include")
143-
target_link_libraries(boost_runtime_services PUBLIC ${BOOST_RUNTIME_SERVICES_DEPENDENCIES})
144-
target_compile_definitions(boost_runtime_services PUBLIC BOOST_RUNTIME_SERVICES_NO_LIB)
145-
target_compile_definitions(boost_runtime_services PRIVATE BOOST_RUNTIME_SERVICES_SOURCE)
140+
add_library(boost_rts ${BOOST_RTS_HEADERS} ${BOOST_RTS_SOURCES})
141+
add_library(Boost::rts ALIAS boost_rts)
142+
target_compile_features(boost_rts PUBLIC cxx_constexpr)
143+
target_include_directories(boost_rts PUBLIC "${PROJECT_SOURCE_DIR}/include")
144+
target_link_libraries(boost_rts PUBLIC ${BOOST_RTS_DEPENDENCIES})
145+
target_compile_definitions(boost_rts PUBLIC BOOST_RTS_NO_LIB)
146+
target_compile_definitions(boost_rts PRIVATE BOOST_RTS_SOURCE)
146147
if (BUILD_SHARED_LIBS)
147-
target_compile_definitions(boost_runtime_services PUBLIC BOOST_RUNTIME_SERVICES_DYN_LINK)
148+
target_compile_definitions(boost_rts PUBLIC BOOST_RTS_DYN_LINK)
148149
else ()
149-
target_compile_definitions(boost_runtime_services PUBLIC BOOST_RUNTIME_SERVICES_STATIC_LINK)
150+
target_compile_definitions(boost_rts PUBLIC BOOST_RTS_STATIC_LINK)
151+
endif ()
152+
153+
154+
# Zlib
155+
find_package(ZLIB)
156+
if (ZLIB_FOUND)
157+
file(GLOB_RECURSE BOOST_RTS_ZLIB_SOURCES CONFIGURE_DEPENDS src_zlib/*.cpp src_zlib/*.hpp)
158+
file(GLOB_RECURSE BOOST_RTS_ZLIB_HEADERS CONFIGURE_DEPENDS include/boost/rts/zlib/*.hpp)
159+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src_zlib PREFIX "src" FILES ${BOOST_RTS_ZLIB_SOURCES})
160+
add_library(boost_rts_zlib build/Jamfile ${BOOST_RTS_ZLIB_HEADERS} ${BOOST_RTS_ZLIB_SOURCES})
161+
add_library(Boost::rts_zlib ALIAS boost_rts_zlib)
162+
target_link_libraries(boost_rts_zlib PUBLIC boost_rts)
163+
target_link_libraries(boost_rts_zlib PRIVATE ZLIB::ZLIB)
164+
target_compile_definitions(boost_rts_zlib PUBLIC BOOST_RTS_HAS_ZLIB)
165+
target_compile_definitions(boost_rts_zlib PRIVATE BOOST_RTS_SOURCE)
150166
endif ()
151167

152168
#-------------------------------------------------
153169
#
154170
# Tests
155171
#
156172
#-------------------------------------------------
157-
if (BOOST_RUNTIME_SERVICES_BUILD_TESTS)
173+
if (BOOST_RTS_BUILD_TESTS)
158174
add_subdirectory(test)
159175
endif ()
160176

@@ -163,6 +179,6 @@ endif ()
163179
# Examples
164180
#
165181
#-------------------------------------------------
166-
if (BOOST_RUNTIME_SERVICES_BUILD_EXAMPLES)
182+
if (BOOST_RTS_BUILD_EXAMPLES)
167183
# add_subdirectory(example)
168184
endif ()

README.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@
22
|===
33

44
|Branch
5-
|https://github.com/cppalliance/runtime_services/tree/master[`master`]
6-
|https://github.com/cppalliance/runtime_services/tree/develop[`develop`]
5+
|https://github.com/cppalliance/rts/tree/master[`master`]
6+
|https://github.com/cppalliance/rts/tree/develop[`develop`]
77

8-
|https://develop.runtime_services.cpp.al/[Docs]
9-
|https://master.runtime_services.cpp.al/[image:https://img.shields.io/badge/docs-master-brightgreen.svg[Documentation]]
10-
|https://develop.runtime_services.cpp.al/[image:https://img.shields.io/badge/docs-develop-brightgreen.svg[Documentation]]
8+
|https://develop.rts.cpp.al/[Docs]
9+
|https://master.rts.cpp.al/[image:https://img.shields.io/badge/docs-master-brightgreen.svg[Documentation]]
10+
|https://develop.rts.cpp.al/[image:https://img.shields.io/badge/docs-develop-brightgreen.svg[Documentation]]
1111

1212
|https://github.com/[GitHub Actions]
13-
|https://github.com/cppalliance/runtime_services/actions/workflows/ci.yml?query=branch%3Amaster[image:https://github.com/cppalliance/runtime_services/actions/workflows/ci.yml/badge.svg?branch=master[CI]]
14-
|https://github.com/cppalliance/runtime_services/actions/workflows/ci.yml?query=branch%3Adevelop[image:https://github.com/cppalliance/runtime_services/actions/workflows/ci.yml/badge.svg?branch=develop[CI]]
13+
|https://github.com/cppalliance/rts/actions/workflows/ci.yml?query=branch%3Amaster[image:https://github.com/cppalliance/rts/actions/workflows/ci.yml/badge.svg?branch=master[CI]]
14+
|https://github.com/cppalliance/rts/actions/workflows/ci.yml?query=branch%3Adevelop[image:https://github.com/cppalliance/rts/actions/workflows/ci.yml/badge.svg?branch=develop[CI]]
1515

1616

1717
|https://drone.io/[Drone]
18-
|https://drone.cpp.al/cppalliance/runtime_services/branches[image:https://drone.cpp.al/api/badges/cppalliance/runtime_services/status.svg?ref=refs/heads/master[Build Status]]
19-
|https://drone.cpp.al/cppalliance/runtime_services/branches[image:https://drone.cpp.al/api/badges/cppalliance/runtime_services/status.svg?ref=refs/heads/develop[Build Status]]
18+
|https://drone.cpp.al/cppalliance/rts/branches[image:https://drone.cpp.al/api/badges/cppalliance/rts/status.svg?ref=refs/heads/master[Build Status]]
19+
|https://drone.cpp.al/cppalliance/rts/branches[image:https://drone.cpp.al/api/badges/cppalliance/rts/status.svg?ref=refs/heads/develop[Build Status]]
2020

2121
|https://codecov.io[Codecov]
22-
|https://app.codecov.io/gh/cppalliance/runtime_services/tree/master[image:https://codecov.io/gh/cppalliance/runtime_services/branch/master/graph/badge.svg[codecov]]
23-
|https://app.codecov.io/gh/cppalliance/runtime_services/tree/develop[image:https://codecov.io/gh/cppalliance/runtime_services/branch/develop/graph/badge.svg[codecov]]
22+
|https://app.codecov.io/gh/cppalliance/rts/tree/master[image:https://codecov.io/gh/cppalliance/rts/branch/master/graph/badge.svg[codecov]]
23+
|https://app.codecov.io/gh/cppalliance/rts/tree/develop[image:https://codecov.io/gh/cppalliance/rts/branch/develop/graph/badge.svg[codecov]]
2424

2525
|===
2626

27-
== Boost.RuntimeServices
27+
== Boost.RunTimeServices
2828

29-
Provides facilities for creating and accessing optional services during runtime.
29+
Provides facilities for creating and accessing services during runtime.
3030

3131
=== Visual Studio Solution Generation
3232

0 commit comments

Comments
 (0)