From 948b0bb902355c4ddbb829dc208be96bd5d47b01 Mon Sep 17 00:00:00 2001 From: David Sisson Date: Wed, 21 Feb 2024 08:48:51 -0800 Subject: [PATCH] Try using ExternalProject --- third_party/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 08d99d18..a0e3f54b 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -12,11 +12,12 @@ add_subdirectory(fmt) find_package(GTest QUIET CONFIG) if(NOT ${GTEST_FOUND}) message(STATUS "Using bundled GoogleTest library.") - add_subdirectory(googletest) - FetchContent_SetPopulated( + include(ExternalProject) + ExternalProject_Add( GTest - SOURCE_DIR googletest + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/googletest + INSTALL_COMMAND "" ) endif()