🔨 properly find and use Git

parent d144459f
...@@ -4,8 +4,9 @@ option(JSON_NoExceptions "Build test suite without exceptions" OFF) ...@@ -4,8 +4,9 @@ option(JSON_NoExceptions "Build test suite without exceptions" OFF)
option(JSON_Coverage "Build test suite with coverage information" OFF) option(JSON_Coverage "Build test suite with coverage information" OFF)
# target to download test data # target to download test data
find_package(Git)
add_custom_target(download_test_data 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" COMMENT "Downloading test data from https://github.com/nlohmann/json_test_data"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment