Skip to content

Commit 4099eed

Browse files
committed
Use JSON_TestDataDirectory directly
1 parent 2c27e0e commit 4099eed

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

cmake/download_test_data.cmake

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
set(JSON_TEST_DATA_URL https://github.com/nlohmann/json_test_data)
22
set(JSON_TEST_DATA_VERSION 3.1.0)
33

4-
set(JSON_TEST_DATA_DIR /usr/share/json_test_data)
5-
6-
if(EXISTS ${JSON_TEST_DATA_DIR})
7-
set(JSON_TestDataDirectory ${JSON_TEST_DATA_DIR})
8-
endif()
4+
include(ExternalProject)
95

106
# if variable is set, use test data from given directory rather than downloading them
117
if(JSON_TestDataDirectory)
128
message(STATUS "Using test data in ${JSON_TestDataDirectory}.")
139
add_custom_target(download_test_data)
1410
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${JSON_TestDataDirectory}\"\n")
1511
else()
16-
include(ExternalProject)
1712
# create a header with the path to the downloaded test data
1813
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/test_files\"\n")
1914

0 commit comments

Comments
 (0)