Skip to content

Commit 1198313

Browse files
authored
[submodules] Migrate scope-guard to vcpkg (#4462)
MULTI-2340
2 parents 61641bd + 06df3ae commit 1198313

File tree

6 files changed

+10
-17
lines changed

6 files changed

+10
-17
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
[submodule "3rd-party/semver"]
1212
path = 3rd-party/semver
1313
url = https://github.com/CanonicalLtd/semver.git
14-
[submodule "3rd-party/scope_guard"]
15-
path = 3rd-party/scope_guard
16-
url = https://github.com/ricab/scope_guard.git
1714
[submodule "3rd-party/jsoncpp"]
1815
path = 3rd-party/jsoncpp
1916
url = https://github.com/open-source-parsers/jsoncpp.git

3rd-party/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@ add_library(premock INTERFACE)
108108
target_include_directories(premock INTERFACE
109109
${CMAKE_CURRENT_SOURCE_DIR}/premock)
110110

111-
# scope_guard header only library
112-
add_library(scope_guard INTERFACE)
113-
target_include_directories(scope_guard INTERFACE
114-
${CMAKE_CURRENT_SOURCE_DIR}/scope_guard)
115-
target_compile_definitions(scope_guard INTERFACE
116-
SG_REQUIRE_NOEXCEPT_IN_CPP17)
117-
118111
# semver library
119112
add_subdirectory_compat(semver EXCLUDE_FROM_ALL)
120113
target_include_directories(semver INTERFACE

3rd-party/scope_guard

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rd-party/submodule_info.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ Version: 11.0.2 |
2121
<https://github.com/fmtlib/fmt.git> |
2222
<https://github.com/fmtlib/fmt/releases>
2323

24-
### scope_guard
25-
Version: 1.1.0 |
26-
<https://github.com/ricab/scope_guard.git> |
27-
<https://github.com/ricab/scope_guard/releases>
28-
2924
### semver
3025
Version: 1.1.0 (+[our patches](https://github.com/CanonicalLtd/semver/compare/1.1.0..69e1b1e)) |
3126
<https://github.com/CanonicalLtd/semver.git> |

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,18 @@ find_package(OpenSSL REQUIRED)
176176
# gRPC config
177177
find_package(gRPC CONFIG REQUIRED)
178178

179+
180+
# SG_REQUIRE_NOEXCEPT_IN_CPP17
179181
# fmt config
180182
find_package(fmt CONFIG REQUIRED)
181183
# targets: fmt::fmt, fmt::fmt-header-only
182184

185+
# scope_guard config
186+
find_path(SCOPE_GUARD_INCLUDE_DIRS "scope_guard.hpp")
187+
add_library(scope_guard INTERFACE)
188+
target_include_directories(scope_guard INTERFACE ${SCOPE_GUARD_INCLUDE_DIRS})
189+
target_compile_definitions(scope_guard INTERFACE SG_REQUIRE_NOEXCEPT_IN_CPP17)
190+
183191
# Needs to be here before we set further compilation options
184192
add_subdirectory(3rd-party)
185193

vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"builtin-baseline": "4334d8b4c8916018600212ab4dd4bbdc343065d1",
33
"dependencies": [
44
"grpc",
5-
"fmt"
5+
"fmt",
6+
"scope-guard"
67
],
78
"overrides": [
89
{

0 commit comments

Comments
 (0)