Skip to content

Commit 8bb96ca

Browse files
authored
Rename the major version from 4 to 5 (#88)
* Rename the v4 headers, namespace, and macros to v5 Move include/proxy/v4 to include/proxy/v5 and rename every major-qualified name to 5: the inline namespace pro::v5, the module proxy.v5, the PRO5_ and PRO5D_ macros, __msft_lib_proxy5, the MSFT_PROXY_V5_ include guards, and the msft_proxy5 CMake and Meson package, targets, and dependency. This lets Proxy 5 be installed and included side by side with Proxy 4. * Bump the version to 5.0.0 * Update documentation examples for Proxy 5
1 parent d1d74d3 commit 8bb96ca

79 files changed

Lines changed: 544 additions & 544 deletions

File tree

Some content is hidden

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

CMakeLists.txt

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
cmake_minimum_required(VERSION 3.28)
22

3-
project(msft_proxy4 VERSION 4.1.0 LANGUAGES CXX)
4-
add_library(msft_proxy4 INTERFACE)
5-
set_target_properties(msft_proxy4 PROPERTIES EXPORT_NAME proxy)
6-
add_library(msft_proxy4::proxy ALIAS msft_proxy4)
3+
project(msft_proxy5 VERSION 5.0.0 LANGUAGES CXX)
4+
add_library(msft_proxy5 INTERFACE)
5+
set_target_properties(msft_proxy5 PROPERTIES EXPORT_NAME proxy)
6+
add_library(msft_proxy5::proxy ALIAS msft_proxy5)
77

88
# Do not enable building tests if proxy is consumed as
99
# subdirectory (e.g. by CMake FetchContent_Declare).
@@ -39,74 +39,74 @@ endif()
3939
file(GLOB_RECURSE proxy_public_headers CONFIGURE_DEPENDS
4040
"${CMAKE_CURRENT_SOURCE_DIR}/include/proxy/*.h"
4141
"${CMAKE_CURRENT_SOURCE_DIR}/include/proxy/*.ixx")
42-
target_sources(msft_proxy4
42+
target_sources(msft_proxy5
4343
INTERFACE
4444
FILE_SET public_headers
4545
TYPE HEADERS
4646
BASE_DIRS include
4747
FILES ${proxy_public_headers}
4848
)
4949

50-
target_compile_features(msft_proxy4 INTERFACE cxx_std_20)
50+
target_compile_features(msft_proxy5 INTERFACE cxx_std_20)
5151
target_include_directories(
52-
msft_proxy4
52+
msft_proxy5
5353
INTERFACE
5454
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
5555
$<INSTALL_INTERFACE:include>
5656
)
5757

5858
# Do not set the module target if proxy is consumed as a subdirectory.
5959
if(PROJECT_IS_TOP_LEVEL)
60-
set(msft_proxy4_INCLUDE_DIR include)
60+
set(msft_proxy5_INCLUDE_DIR include)
6161
if(PROXY_BUILD_MODULES)
62-
include(cmake/msft_proxy4ModuleTargets.cmake)
62+
include(cmake/msft_proxy5ModuleTargets.cmake)
6363
endif()
6464
else()
6565
# Propagate the variable to the parent project
66-
set(msft_proxy4_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
66+
set(msft_proxy5_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
6767
endif()
6868

6969
# install and export the project. project name - proxy
7070

7171
include(GNUInstallDirs)
7272

7373
install(
74-
TARGETS msft_proxy4
75-
EXPORT msft_proxy4Targets
74+
TARGETS msft_proxy5
75+
EXPORT msft_proxy5Targets
7676
FILE_SET public_headers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
7777
)
7878

7979
install(
80-
EXPORT msft_proxy4Targets
81-
NAMESPACE msft_proxy4::
82-
DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy4
80+
EXPORT msft_proxy5Targets
81+
NAMESPACE msft_proxy5::
82+
DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy5
8383
)
8484
export(
85-
TARGETS msft_proxy4
86-
NAMESPACE msft_proxy4::
87-
FILE msft_proxy4Targets.cmake
85+
TARGETS msft_proxy5
86+
NAMESPACE msft_proxy5::
87+
FILE msft_proxy5Targets.cmake
8888
)
8989

9090
include(CMakePackageConfigHelpers)
9191
configure_package_config_file(
92-
cmake/msft_proxy4Config.cmake.in
93-
${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy4Config.cmake
94-
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy4
92+
cmake/msft_proxy5Config.cmake.in
93+
${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy5Config.cmake
94+
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy5
9595
PATH_VARS CMAKE_INSTALL_INCLUDEDIR
9696
)
9797

9898
include(CMakePackageConfigHelpers)
9999
write_basic_package_version_file(
100-
cmake/msft_proxy4ConfigVersion.cmake
100+
cmake/msft_proxy5ConfigVersion.cmake
101101
COMPATIBILITY SameMajorVersion
102102
ARCH_INDEPENDENT
103103
)
104104

105105
install(
106106
FILES
107-
${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy4Config.cmake
108-
${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy4ConfigVersion.cmake
109-
DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy4
107+
${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy5Config.cmake
108+
${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy5ConfigVersion.cmake
109+
DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy5
110110
)
111111

112112
# build tests if BUILD_TESTING is ON

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module(
22
name = "proxy",
3-
version = "4.1.0",
3+
version = "5.0.0",
44
)
55

66
bazel_dep(name = "platforms", version = "1.1.0")

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ Fetch via [CPM](https://github.com/cpm-cmake/CPM.cmake) (a thin wrapper over CMa
242242
243243
```cmake
244244
CPMAddPackage(
245-
NAME msft_proxy4
246-
GIT_TAG 4.1.0
245+
NAME msft_proxy5
246+
GIT_TAG 5.0.0
247247
GIT_REPOSITORY https://github.com/ngcpp/proxy.git
248248
)
249249
250-
target_link_libraries(main PRIVATE msft_proxy4::proxy)
250+
target_link_libraries(main PRIVATE msft_proxy5::proxy)
251251
```
252252

253253
Or, if you already have a local clone, use `add_subdirectory(path/to/proxy)` instead of `CPMAddPackage`.
@@ -259,17 +259,17 @@ Place a wrap file at `subprojects/proxy.wrap` and Meson will fetch the source au
259259
```ini
260260
[wrap-git]
261261
url = https://github.com/ngcpp/proxy.git
262-
revision = 4.1.0
262+
revision = 5.0.0
263263

264264
[provide]
265-
dependency_names = msft_proxy4
265+
dependency_names = msft_proxy5
266266
```
267267

268268
Then in your `meson.build`:
269269

270270
```meson
271-
msft_proxy4_dep = dependency('msft_proxy4')
272-
executable('main', 'main.cpp', dependencies: msft_proxy4_dep)
271+
msft_proxy5_dep = dependency('msft_proxy5')
272+
executable('main', 'main.cpp', dependencies: msft_proxy5_dep)
273273
```
274274

275275
### Bazel
@@ -279,7 +279,7 @@ The library is not yet published to the [Bazel Central Registry](https://registr
279279
With **Bzlmod** (Bazel 7+), add to your `MODULE.bazel`:
280280

281281
```python
282-
bazel_dep(name = "proxy", version = "4.1.0")
282+
bazel_dep(name = "proxy", version = "5.0.0")
283283
git_override(
284284
module_name = "proxy",
285285
remote = "https://github.com/ngcpp/proxy.git",
@@ -294,7 +294,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
294294
git_repository(
295295
name = "proxy",
296296
remote = "https://github.com/ngcpp/proxy.git",
297-
tag = "4.1.0",
297+
tag = "5.0.0",
298298
)
299299
load("@proxy//:proxy_deps.bzl", "proxy_deps")
300300
proxy_deps()

benchmarks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ add_executable(
2828
target_include_directories(msft_proxy_benchmarks PRIVATE .)
2929
target_link_libraries(
3030
msft_proxy_benchmarks
31-
PRIVATE msft_proxy4::proxy benchmark::benchmark benchmark::benchmark_main
31+
PRIVATE msft_proxy5::proxy benchmark::benchmark benchmark::benchmark_main
3232
)
3333
target_compile_options(
3434
msft_proxy_benchmarks

benchmarks/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ benchmark(
88
'proxy_operation_benchmark_context.cpp',
99
),
1010
implicit_include_directories: false,
11-
dependencies: [msft_proxy4_dep, benchmark_dep],
11+
dependencies: [msft_proxy5_dep, benchmark_dep],
1212
cpp_args: cxx.get_argument_syntax() == 'msvc' ? ['/bigobj'] : [],
1313
),
1414
)

cmake/msft_proxy4Config.cmake.in

Lines changed: 0 additions & 5 deletions
This file was deleted.

cmake/msft_proxy4ModuleTargets.cmake

Lines changed: 0 additions & 34 deletions
This file was deleted.

cmake/msft_proxy5Config.cmake.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@PACKAGE_INIT@
2+
3+
include("${CMAKE_CURRENT_LIST_DIR}/msft_proxy5Targets.cmake")
4+
5+
set(msft_proxy5_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
if(NOT DEFINED msft_proxy5_INCLUDE_DIR)
2+
message(
3+
FATAL_ERROR
4+
"`msft_proxy5_INCLUDE_DIR` must be defined to use this script."
5+
)
6+
endif()
7+
8+
message(
9+
STATUS
10+
"Declaring `msft_proxy5::proxy_module` target for include path `${msft_proxy5_INCLUDE_DIR}`"
11+
)
12+
13+
add_library(msft_proxy5_module)
14+
set_target_properties(
15+
msft_proxy5_module
16+
PROPERTIES SYSTEM TRUE EXCLUDE_FROM_ALL TRUE
17+
)
18+
19+
add_library(msft_proxy5::proxy_module ALIAS msft_proxy5_module)
20+
target_sources(
21+
msft_proxy5_module
22+
PUBLIC
23+
FILE_SET CXX_MODULES
24+
BASE_DIRS ${msft_proxy5_INCLUDE_DIR}
25+
FILES ${msft_proxy5_INCLUDE_DIR}/proxy/v5/proxy.ixx
26+
)
27+
target_compile_features(msft_proxy5_module PUBLIC cxx_std_20)
28+
target_compile_options(
29+
msft_proxy5_module
30+
PRIVATE
31+
$<$<CXX_COMPILER_ID:MSVC>:/utf-8>
32+
$<$<CXX_COMPILER_ID:Clang,AppleClang>:-Wno-c++2b-extensions>
33+
)
34+
target_link_libraries(msft_proxy5_module PUBLIC msft_proxy5::proxy)

docs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ foreach(i RANGE 0 ${_last})
6060
add_executable(example_${_suffix} "${_cpp}")
6161
target_link_libraries(
6262
example_${_suffix}
63-
PRIVATE msft_proxy4::proxy ${_dep_names}
63+
PRIVATE msft_proxy5::proxy ${_dep_names}
6464
)
6565
target_compile_options(example_${_suffix} PRIVATE ${PROXY_BUILD_FLAGS})
6666
add_test(NAME example_${_suffix} COMMAND example_${_suffix})

0 commit comments

Comments
 (0)