From ec5cfdd307d448ecc4d89778d89098536e41a925 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 1 May 2020 16:18:04 +0200 Subject: [PATCH] :hammer: properly find and use Git --- test/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 45bffe021..30bef5e64 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,8 +4,9 @@ option(JSON_NoExceptions "Build test suite without exceptions" OFF) option(JSON_Coverage "Build test suite with coverage information" OFF) # target to download test data +find_package(Git) add_custom_target(download_test_data - COMMAND test -d json_test_data || git clone https://github.com/nlohmann/json_test_data.git --quiet --depth 1 + COMMAND test -d json_test_data || ${GIT_EXECUTABLE} clone https://github.com/nlohmann/json_test_data.git --quiet --depth 1 COMMENT "Downloading test data from https://github.com/nlohmann/json_test_data" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )