@@ -38,7 +38,6 @@ fetchcontent_declare(benchmark
3838fetchcontent_getproperties(googletest)
3939if (BUILD_TESTING)
4040 message (STATUS "Dependency: googletest (BUILD_TESTING=${BUILD_TESTING} )" )
41-
4241 if (NOT googletest_POPULATED)
4342 if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "MSVC" )
4443 # All the libraries in the build must use either /MD or /MT (runtime
@@ -61,12 +60,14 @@ endif()
6160
6261fetchcontent_getproperties(abseil)
6362if (NOT abseil_POPULATED)
63+ message (STATUS "Dependency: abseil" )
6464 fetchcontent_populate(abseil)
6565 add_subdirectory (${abseil_SOURCE_DIR} ${abseil_BINARY_DIR} EXCLUDE_FROM_ALL )
6666endif ()
6767
6868fetchcontent_getproperties(prometheus)
6969if (NOT prometheus_POPULATED)
70+ message (STATUS "Dependency: prometheus" )
7071 set (ENABLE_PUSH OFF CACHE BOOL "Build prometheus-cpp push library" FORCE)
7172 set (ENABLE_PULL OFF CACHE BOOL "Build prometheus-cpp pull library" FORCE)
7273 set (ENABLE_COMPRESSION OFF
@@ -79,14 +80,17 @@ if(NOT prometheus_POPULATED)
7980endif ()
8081
8182fetchcontent_getproperties(benchmark)
82- if (NOT benchmark_POPULATED)
83- set (BENCHMARK_ENABLE_TESTING OFF
84- CACHE BOOL "Enable testing of the benchmark library."
85- FORCE)
86- set (BENCHMARK_ENABLE_GTEST_TESTS OFF
87- CACHE BOOL "Enable building the unit tests which depend on gtest"
88- FORCE)
89- fetchcontent_populate(benchmark)
90- add_subdirectory (${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR}
91- EXCLUDE_FROM_ALL )
83+ if (BUILD_TESTING)
84+ message (STATUS "Dependency: benchmark (BUILD_TESTING=${BUILD_TESTING} )" )
85+ 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)
93+ add_subdirectory (${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR}
94+ EXCLUDE_FROM_ALL )
95+ endif ()
9296endif ()
0 commit comments