Skip to content

Commit

Permalink
Use FetchContent_MakeAvailable.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiavrammsd committed Aug 11, 2024
1 parent df079bd commit 3ca018f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ endif()
include(FetchContent)
if (NOT googletest_POPULATED)
FetchContent_Declare(googletest URL https://github.com/google/googletest/archive/release-1.11.0.zip)
FetchContent_Populate(googletest)
include_directories(${googletest_SOURCE_DIR}/googletest/include/)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
FetchContent_MakeAvailable(googletest)
endif ()

# Test macro
Expand Down Expand Up @@ -48,8 +46,7 @@ set_target_properties(channel_test17 PROPERTIES CXX_STANDARD 17 CMAKE_CXX_STANDA
# Benchmark
if (NOT benchmark_POPULATED)
FetchContent_Declare(benchmark URL https://github.com/google/benchmark/archive/v1.6.1.zip)
FetchContent_Populate(benchmark)
add_subdirectory(${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR})
FetchContent_MakeAvailable(benchmark)
endif ()

add_executable(channel_benchmark channel_benchmark.cpp)
Expand Down

0 comments on commit 3ca018f

Please sign in to comment.