Skip to content

Commit 70bf557

Browse files
authored
[vcpkg baseline][opencensus-cpp] De-vendor dependencies (#26567)
* [opencensus-cpp] De-vendor dependencies * version
1 parent 10ad7b2 commit 70bf557

File tree

5 files changed

+39
-17
lines changed

5 files changed

+39
-17
lines changed

Diff for: ports/opencensus-cpp/fix-install.patch

+24-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 0ecec53..07162ed 100644
2+
index 0ecec53..45d994c 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -29,7 +29,7 @@ project(
6-
option(FUZZER "Either OFF or e.g. -fsanitize=fuzzer,address" OFF)
5+
@@ -38,7 +38,13 @@ enable_testing()
76

8-
if(NOT CMAKE_CXX_STANDARD)
9-
- set(CMAKE_CXX_STANDARD 11)
10-
+ set(CMAKE_CXX_STANDARD 14)
11-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
12-
endif()
7+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
8+
9+
-include(OpenCensusDeps)
10+
+find_package(absl CONFIG REQUIRED)
11+
+find_package(prometheus-cpp CONFIG REQUIRED)
12+
+
13+
+if(BUILD_TESTING)
14+
+ find_package(GTest CONFIG REQUIRED)
15+
+ find_package(benchmark CONFIG REQUIRED)
16+
+endif()
17+
18+
include(OpenCensusHelpers)
1319

1420
diff --git a/cmake/OpenCensusHelpers.cmake b/cmake/OpenCensusHelpers.cmake
15-
index 8fdfe96..53bc877 100644
21+
index 8fdfe96..6667085 100644
1622
--- a/cmake/OpenCensusHelpers.cmake
1723
+++ b/cmake/OpenCensusHelpers.cmake
18-
@@ -37,6 +37,13 @@ function(opencensus_test NAME SRC)
24+
@@ -35,8 +35,15 @@ function(opencensus_test NAME SRC)
25+
set(_NAME "opencensus_${NAME}")
26+
add_executable(${_NAME} ${SRC})
1927
prepend_opencensus(DEPS "${ARGN}")
20-
target_link_libraries(${_NAME} "${DEPS}" gmock gtest_main)
28+
- target_link_libraries(${_NAME} "${DEPS}" gmock gtest_main)
29+
+ target_link_libraries(${_NAME} "${DEPS}" GTest::gmock GTest::gtest_main)
2130
add_test(NAME ${_NAME} COMMAND ${_NAME})
2231
+
2332
+ install(
@@ -29,10 +38,12 @@ index 8fdfe96..53bc877 100644
2938
endif()
3039
endfunction()
3140

32-
@@ -50,6 +57,13 @@ function(opencensus_benchmark NAME SRC)
41+
@@ -49,7 +56,14 @@ function(opencensus_benchmark NAME SRC)
42+
set(_NAME "opencensus_${NAME}")
3343
add_executable(${_NAME} ${SRC})
3444
prepend_opencensus(DEPS "${ARGN}")
35-
target_link_libraries(${_NAME} "${DEPS}" benchmark)
45+
- target_link_libraries(${_NAME} "${DEPS}" benchmark)
46+
+ target_link_libraries(${_NAME} "${DEPS}" benchmark::benchmark)
3647
+
3748
+ install(
3849
+ TARGETS ${_NAME}

Diff for: ports/opencensus-cpp/portfile.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ vcpkg_from_github(
44
REF 62d8281899a1cfd1084793f64295329a6b5d22b3 # 2021-08-26
55
SHA512 35df40d7e5ce933384fe6ba4ac2d704e0801ac47765fca97ea3f8d787886abe5c588855c3aac5745f047c1c8f2047e1f69b62340dd702042a61c3dc430ca36b4
66
HEAD_REF master
7-
PATCHES fix-install.patch
7+
PATCHES
8+
fix-install.patch
89
)
910

1011
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

Diff for: ports/opencensus-cpp/vcpkg.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
{
22
"name": "opencensus-cpp",
33
"version-date": "2021-08-26",
4-
"port-version": 1,
4+
"port-version": 2,
55
"description": "OpenCensus is a toolkit for collecting application performance and behavior data. It currently includes an API for tracing and stats.",
66
"homepage": "https://github.com/census-instrumentation/opencensus-cpp",
77
"license": "Apache-2.0",
88
"supports": "!windows",
99
"dependencies": [
1010
"abseil",
11+
"prometheus-cpp",
1112
{
1213
"name": "vcpkg-cmake",
1314
"host": true
1415
}
1516
],
1617
"features": {
1718
"test": {
18-
"description": "Build test"
19+
"description": "Build test",
20+
"dependencies": [
21+
"benchmark",
22+
"gtest"
23+
]
1924
}
2025
}
2126
}

Diff for: versions/baseline.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5218,7 +5218,7 @@
52185218
},
52195219
"opencensus-cpp": {
52205220
"baseline": "2021-08-26",
5221-
"port-version": 1
5221+
"port-version": 2
52225222
},
52235223
"opencl": {
52245224
"baseline": "2.2",

Diff for: versions/o-/opencensus-cpp.json

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "12e85bfcbf3ecda837c873e30ca6e872e3a5fa89",
5+
"version-date": "2021-08-26",
6+
"port-version": 2
7+
},
38
{
49
"git-tree": "043d8a451b507daa585a8a716cf297421912d3d4",
510
"version-date": "2021-08-26",

0 commit comments

Comments
 (0)