1414
1515include (FetchContent)
1616
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- 2c8421e1c6cef0da9e8a20b01c15256ec9ec116d)
27- fetchcontent_declare(prometheus
28- GIT_REPOSITORY
29- https://github.com/jupp0r/prometheus-cpp
30- GIT_TAG
31- master)
32- fetchcontent_declare(benchmark
33- GIT_REPOSITORY
34- https://github.com/google/benchmark
35- GIT_TAG
36- master)
17+ FetchContent_Declare(googletest
18+ GIT_REPOSITORY https://github.com/abseil/googletest
19+ GIT_TAG ed2fe122f8dc9aca844d724986d1d5cf5b65ea4e)
20+ FetchContent_Declare(abseil
21+ GIT_REPOSITORY https://github.com/abseil/abseil-cpp
22+ GIT_TAG 2c8421e1c6cef0da9e8a20b01c15256ec9ec116d)
23+ FetchContent_Declare(prometheus
24+ GIT_REPOSITORY https://github.com/jupp0r/prometheus-cpp
25+ GIT_TAG master)
26+ FetchContent_Declare(benchmark
27+ GIT_REPOSITORY https://github.com/google/benchmark
28+ GIT_TAG master)
3729
38- fetchcontent_getproperties (googletest)
30+ FetchContent_GetProperties (googletest)
3931if (BUILD_TESTING)
4032 message (STATUS "Dependency: googletest (BUILD_TESTING=${BUILD_TESTING} )" )
4133 if (NOT googletest_POPULATED)
@@ -52,44 +44,44 @@ if(BUILD_TESTING)
5244 ON )
5345 endif ()
5446
55- fetchcontent_populate (googletest)
47+ FetchContent_Populate (googletest)
5648 add_subdirectory (${googletest_SOURCE_DIR} ${googletest_BINARY_DIR}
5749 EXCLUDE_FROM_ALL )
5850 endif ()
5951endif ()
6052
61- fetchcontent_getproperties (abseil)
53+ FetchContent_GetProperties (abseil)
6254if (NOT abseil_POPULATED)
6355 message (STATUS "Dependency: abseil" )
64- fetchcontent_populate (abseil)
56+ FetchContent_Populate (abseil)
6557 add_subdirectory (${abseil_SOURCE_DIR} ${abseil_BINARY_DIR} EXCLUDE_FROM_ALL )
6658endif ()
6759
68- fetchcontent_getproperties (prometheus)
60+ FetchContent_GetProperties (prometheus)
6961if (NOT prometheus_POPULATED)
7062 message (STATUS "Dependency: prometheus" )
7163 set (ENABLE_PUSH OFF CACHE BOOL "Build prometheus-cpp push library" FORCE)
7264 set (ENABLE_PULL OFF CACHE BOOL "Build prometheus-cpp pull library" FORCE)
73- set (ENABLE_COMPRESSION OFF
74- CACHE BOOL "Enable gzip compression for prometheus-cpp"
75- FORCE)
65+ set (ENABLE_COMPRESSION
66+ OFF
67+ CACHE BOOL "Enable gzip compression for prometheus-cpp" FORCE)
7668 set (ENABLE_TESTING OFF CACHE BOOL "Build test for prometheus-cpp" FORCE)
77- fetchcontent_populate (prometheus)
69+ FetchContent_Populate (prometheus)
7870 add_subdirectory (${prometheus_SOURCE_DIR} ${prometheus_BINARY_DIR}
7971 EXCLUDE_FROM_ALL )
8072endif ()
8173
82- fetchcontent_getproperties (benchmark)
74+ FetchContent_GetProperties (benchmark)
8375if (BUILD_TESTING)
8476 message (STATUS "Dependency: benchmark (BUILD_TESTING=${BUILD_TESTING} )" )
8577 if (NOT benchmark_POPULATED)
86- set (BENCHMARK_ENABLE_TESTING OFF
87- CACHE BOOL "Enable testing of the benchmark library."
88- FORCE)
89- set (BENCHMARK_ENABLE_GTEST_TESTS OFF
90- CACHE BOOL "Enable building the unit tests which depend on gtest"
91- FORCE)
92- fetchcontent_populate (benchmark)
78+ set (BENCHMARK_ENABLE_TESTING
79+ OFF
80+ CACHE BOOL "Enable testing of the benchmark library." FORCE)
81+ set (BENCHMARK_ENABLE_GTEST_TESTS
82+ OFF
83+ CACHE BOOL "Enable building the unit tests which depend on gtest" FORCE)
84+ FetchContent_Populate (benchmark)
9385 add_subdirectory (${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR}
9486 EXCLUDE_FROM_ALL )
9587 endif ()
0 commit comments