From 2304629a3f11d413c4d40eae95146c5a5557ba96 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Mon, 4 May 2020 16:00:00 +0200 Subject: [PATCH] :pushpin: use JSON test data v1.0.0 --- cmake/download_test_data.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/download_test_data.cmake b/cmake/download_test_data.cmake index 5fe4972b..e659da9d 100644 --- a/cmake/download_test_data.cmake +++ b/cmake/download_test_data.cmake @@ -1,9 +1,12 @@ find_package(Git) +set(JSON_TEST_DATA_URL https://github.com/nlohmann/json_test_data) +set(JSON_TEST_DATA_VERSION 1.0.0) + # target to download test data add_custom_target(download_test_data - 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" + COMMAND test -d json_test_data || ${GIT_EXECUTABLE} clone -c advice.detachedHead=false --branch v${JSON_TEST_DATA_VERSION} ${JSON_TEST_DATA_URL}.git --quiet --depth 1 + COMMENT "Downloading test data from ${JSON_TEST_DATA_URL} (v${JSON_TEST_DATA_VERSION})" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )