Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FetchContent_MakeAvailable #45

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading