Skip to content

Commit

Permalink
Now try FetchContent
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Feb 21, 2024
1 parent 948b0bb commit 0ef66db
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ add_subdirectory(fmt)

find_package(GTest QUIET CONFIG)
if(NOT ${GTEST_FOUND})
message(STATUS "Using bundled GoogleTest library.")
include(ExternalProject)
ExternalProject_Add(
GTest
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/googletest
INSTALL_COMMAND ""
message(STATUS "Retrieving external GoogleTest library.")
include(FetchContent)
FetchContent_Declare(GTest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(GTest)
endif()

add_subdirectory(protobuf-matchers)
Expand Down

0 comments on commit 0ef66db

Please sign in to comment.