Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit fda1c2f

Browse files
g-easymeastp
authored andcommitted
format
1 parent d00d813 commit fda1c2f

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

cmake/OpenCensusDeps.cmake

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@
1414

1515
include(FetchContent)
1616

17-
FetchContent_Declare(
18-
googletest
19-
GIT_REPOSITORY https://github.com/abseil/googletest
20-
GIT_TAG ed2fe122f8dc9aca844d724986d1d5cf5b65ea4e
21-
)
22-
FetchContent_Declare(
23-
abseil
24-
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
25-
GIT_TAG master
26-
)
27-
FetchContent_Declare(
28-
prometheus
29-
GIT_REPOSITORY https://github.com/jupp0r/prometheus-cpp
30-
GIT_TAG master
31-
)
17+
fetchcontent_declare(googletest
18+
GIT_REPOSITORY
19+
https://github.com/abseil/googletest
20+
GIT_TAG
21+
ed2fe122f8dc9aca844d724986d1d5cf5b65ea4e)
22+
fetchcontent_declare(abseil
23+
GIT_REPOSITORY
24+
https://github.com/abseil/abseil-cpp
25+
GIT_TAG
26+
master)
27+
fetchcontent_declare(prometheus
28+
GIT_REPOSITORY
29+
https://github.com/jupp0r/prometheus-cpp
30+
GIT_TAG
31+
master)
3232

33-
FetchContent_GetProperties(googletest)
33+
fetchcontent_getproperties(googletest)
3434
if(BUILD_TESTING)
3535
message(STATUS "Dependency: googletest (BUILD_TESTING=${BUILD_TESTING})")
36-
36+
3737
if(NOT googletest_POPULATED)
3838
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
3939
# All the libraries in the build must use either /MD or /MT (runtime
@@ -47,26 +47,28 @@ if(BUILD_TESTING)
4747
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
4848
ON)
4949
endif()
50-
51-
FetchContent_Populate(googletest)
52-
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
50+
51+
fetchcontent_populate(googletest)
52+
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR}
53+
EXCLUDE_FROM_ALL)
5354
endif()
5455
endif()
5556

56-
FetchContent_GetProperties(abseil)
57+
fetchcontent_getproperties(abseil)
5758
if(NOT abseil_POPULATED)
58-
FetchContent_Populate(abseil)
59+
fetchcontent_populate(abseil)
5960
add_subdirectory(${abseil_SOURCE_DIR} ${abseil_BINARY_DIR} EXCLUDE_FROM_ALL)
6061
endif()
6162

62-
FetchContent_GetProperties(prometheus)
63+
fetchcontent_getproperties(prometheus)
6364
if(NOT prometheus_POPULATED)
6465
set(ENABLE_PUSH OFF CACHE BOOL "Build prometheus-cpp push library" FORCE)
6566
set(ENABLE_PULL OFF CACHE BOOL "Build prometheus-cpp pull library" FORCE)
6667
set(ENABLE_COMPRESSION OFF
6768
CACHE BOOL "Enable gzip compression for prometheus-cpp"
6869
FORCE)
6970
set(ENABLE_TESTING OFF CACHE BOOL "Build test for prometheus-cpp" FORCE)
70-
FetchContent_Populate(prometheus)
71-
add_subdirectory(${prometheus_SOURCE_DIR} ${prometheus_BINARY_DIR} EXCLUDE_FROM_ALL)
71+
fetchcontent_populate(prometheus)
72+
add_subdirectory(${prometheus_SOURCE_DIR} ${prometheus_BINARY_DIR}
73+
EXCLUDE_FROM_ALL)
7274
endif()

0 commit comments

Comments
 (0)