Skip to content

Commit 93cf490

Browse files
committed
Restore cmake formatting changes
1 parent f52842f commit 93cf490

File tree

1 file changed

+21
-28
lines changed

1 file changed

+21
-28
lines changed

cmake/opentelemetry-proto.cmake

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
#
5-
# The dependency on opentelemetry-proto can be provided by order of decreasing
6-
# priority, options are:
5+
# The dependency on opentelemetry-proto can be provided by order
6+
# of decreasing priority, options are:
77
#
8-
# 1 - Fetch from local source directory defined by the OTELCPP_PROTO_PATH
9-
# variable
8+
# 1 - Fetch from local source directory defined by the OTELCPP_PROTO_PATH variable
109
#
11-
# 2 - Fetch from the opentelemetry-proto git submodule
12-
# (opentelemetry-cpp/third_party/opentelemetry-proto)
10+
# 2 - Fetch from the opentelemetry-proto git submodule (opentelemetry-cpp/third_party/opentelemetry-proto)
1311
#
14-
# 3 - Fetch from github using the git tag set in
15-
# opentelemetry-cpp/third_party_release
12+
# 3 - Fetch from github using the git tag set in opentelemetry-cpp/third_party_release
1613
#
1714

18-
set(OPENTELEMETRY_PROTO_SUBMODULE
19-
"${opentelemetry-cpp_SOURCE_DIR}/third_party/opentelemetry-proto")
15+
set(OPENTELEMETRY_PROTO_SUBMODULE "${opentelemetry-cpp_SOURCE_DIR}/third_party/opentelemetry-proto")
2016

2117
if(OTELCPP_PROTO_PATH)
2218
if(NOT EXISTS
@@ -25,32 +21,29 @@ if(OTELCPP_PROTO_PATH)
2521
FATAL_ERROR
2622
"OTELCPP_PROTO_PATH does not point to a opentelemetry-proto repository")
2723
endif()
28-
message(
29-
STATUS
30-
"fetching opentelemetry-proto from OTELCPP_PROTO_PATH=${OTELCPP_PROTO_PATH}"
24+
message(STATUS "fetching opentelemetry-proto from OTELCPP_PROTO_PATH=${OTELCPP_PROTO_PATH}")
25+
FetchContent_Declare(
26+
opentelemetry-proto
27+
SOURCE_DIR ${OTELCPP_PROTO_PATH}
3128
)
32-
FetchContent_Declare(opentelemetry-proto SOURCE_DIR ${OTELCPP_PROTO_PATH})
3329
set(opentelemetry-proto_PROVIDER "fetch_source")
34-
# If the opentelemetry-proto directory is a general directory then we don't
35-
# have a good way to determine the version. Set it as unknown.
30+
# If the opentelemetry-proto directory is a general directory then we don't have a good way to determine the version. Set it as unknown.
3631
set(opentelemetry-proto_VERSION "unknown")
3732
elseif(EXISTS ${OPENTELEMETRY_PROTO_SUBMODULE}/.git)
38-
message(STATUS "fetching opentelemetry-proto from git submodule")
39-
FetchContent_Declare(opentelemetry-proto SOURCE_DIR
40-
${OPENTELEMETRY_PROTO_SUBMODULE})
33+
message(STATUS "fetching opentelemetry-proto from git submodule")
34+
FetchContent_Declare(
35+
opentelemetry-proto
36+
SOURCE_DIR ${OPENTELEMETRY_PROTO_SUBMODULE}
37+
)
4138
set(opentelemetry-proto_PROVIDER "fetch_source")
42-
string(REGEX
43-
REPLACE "^v([0-9]+\\.[0-9]+\\.[0-9]+)$" "\\1"
44-
opentelemetry-proto_VERSION "${opentelemetry-proto_GIT_TAG}")
39+
string(REGEX REPLACE "^v([0-9]+\\.[0-9]+\\.[0-9]+)$" "\\1" opentelemetry-proto_VERSION "${opentelemetry-proto_GIT_TAG}")
4540
else()
4641
FetchContent_Declare(
47-
opentelemetry-proto
48-
GIT_REPOSITORY https://github.com/open-telemetry/opentelemetry-proto.git
49-
GIT_TAG "${opentelemetry-proto_GIT_TAG}")
42+
opentelemetry-proto
43+
GIT_REPOSITORY https://github.com/open-telemetry/opentelemetry-proto.git
44+
GIT_TAG "${opentelemetry-proto_GIT_TAG}")
5045
set(opentelemetry-proto_PROVIDER "fetch_repository")
51-
string(REGEX
52-
REPLACE "^v([0-9]+\\.[0-9]+\\.[0-9]+)$" "\\1"
53-
opentelemetry-proto_VERSION "${opentelemetry-proto_GIT_TAG}")
46+
string(REGEX REPLACE "^v([0-9]+\\.[0-9]+\\.[0-9]+)$" "\\1" opentelemetry-proto_VERSION "${opentelemetry-proto_GIT_TAG}")
5447
endif()
5548

5649
FetchContent_MakeAvailable(opentelemetry-proto)

0 commit comments

Comments
 (0)