Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests/cmake external data #1251

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 11 additions & 6 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ add_subdirectory(thirdparty/benchmark)
include_directories(thirdparty)
include_directories(${CMAKE_SOURCE_DIR}/../single_include)

# copy test files to build folder
file(COPY ${CMAKE_SOURCE_DIR}/data DESTINATION .)
file(COPY ${CMAKE_SOURCE_DIR}/../test/data/regression/floats.json
${CMAKE_SOURCE_DIR}/../test/data/regression/unsigned_ints.json
${CMAKE_SOURCE_DIR}/../test/data/regression/signed_ints.json
DESTINATION data/numbers)
include(ExternalData)

set(ExternalData_URL_TEMPLATES
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/regression/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/nativejson-benchmark/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/jeopardy/%(hash)"
)

ExternalData_Expand_Arguments(json_benchmark_data _ DATA{data/,RECURSE:,REGEX:.*})
ExternalData_Add_Target(json_benchmark_data)

# benchmark binary
add_executable(json_benchmarks src/benchmarks.cpp)
target_compile_features(json_benchmarks PRIVATE cxx_std_11)
target_link_libraries(json_benchmarks benchmark ${CMAKE_THREAD_LIBS_INIT})
add_dependencies(json_benchmarks json_benchmark_data)
1 change: 0 additions & 1 deletion benchmarks/data/jeopardy/jeopardy.json

This file was deleted.

1 change: 1 addition & 0 deletions benchmarks/data/jeopardy/jeopardy.json.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e93247fed3511e025b9f4c7d3a6ab3334c77546401fb1d64f4d558af09506308
9 changes: 0 additions & 9 deletions benchmarks/data/nativejson-benchmark/canada.json

This file was deleted.

1 change: 1 addition & 0 deletions benchmarks/data/nativejson-benchmark/canada.json.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f83b3b354030d5dd58740c68ac4fecef64cb730a0d12a90362a7f23077f50d78
Loading