use CMake ExternalData for benchmark data files
This commit is contained in:
parent
423edf0fdb
commit
c3d07d39af
@ -14,14 +14,19 @@ add_subdirectory(thirdparty/benchmark)
|
|||||||
include_directories(thirdparty)
|
include_directories(thirdparty)
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/../single_include)
|
include_directories(${CMAKE_SOURCE_DIR}/../single_include)
|
||||||
|
|
||||||
# copy test files to build folder
|
include(ExternalData)
|
||||||
file(COPY ${CMAKE_SOURCE_DIR}/data DESTINATION .)
|
|
||||||
file(COPY ${CMAKE_SOURCE_DIR}/../test/data/regression/floats.json
|
set(ExternalData_URL_TEMPLATES
|
||||||
${CMAKE_SOURCE_DIR}/../test/data/regression/unsigned_ints.json
|
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/regression/%(hash)"
|
||||||
${CMAKE_SOURCE_DIR}/../test/data/regression/signed_ints.json
|
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/nativejson-benchmark/%(hash)"
|
||||||
DESTINATION data/numbers)
|
"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
|
# benchmark binary
|
||||||
add_executable(json_benchmarks src/benchmarks.cpp)
|
add_executable(json_benchmarks src/benchmarks.cpp)
|
||||||
target_compile_features(json_benchmarks PRIVATE cxx_std_11)
|
target_compile_features(json_benchmarks PRIVATE cxx_std_11)
|
||||||
target_link_libraries(json_benchmarks benchmark ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(json_benchmarks benchmark ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
add_dependencies(json_benchmarks json_benchmark_data)
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
benchmarks/data/jeopardy/jeopardy.json.sha256
Normal file
1
benchmarks/data/jeopardy/jeopardy.json.sha256
Normal file
@ -0,0 +1 @@
|
|||||||
|
e93247fed3511e025b9f4c7d3a6ab3334c77546401fb1d64f4d558af09506308
|
||||||
File diff suppressed because one or more lines are too long
1
benchmarks/data/nativejson-benchmark/canada.json.sha256
Normal file
1
benchmarks/data/nativejson-benchmark/canada.json.sha256
Normal file
@ -0,0 +1 @@
|
|||||||
|
f83b3b354030d5dd58740c68ac4fecef64cb730a0d12a90362a7f23077f50d78
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
|||||||
|
a73e7a883f6ea8de113dff59702975e60119b4b58d451d518a929f31c92e2059
|
||||||
File diff suppressed because it is too large
Load Diff
1
benchmarks/data/nativejson-benchmark/twitter.json.sha256
Normal file
1
benchmarks/data/nativejson-benchmark/twitter.json.sha256
Normal file
@ -0,0 +1 @@
|
|||||||
|
a08b769f32b95f426cbc3abafcec65c1a19d3eb544d4ddf320eae142c99efc5d
|
||||||
1
benchmarks/data/numbers/floats.json.sha256
Normal file
1
benchmarks/data/numbers/floats.json.sha256
Normal file
@ -0,0 +1 @@
|
|||||||
|
b90f67db4b07a23b3f75370d93123d1d107f9fc66d42342d9e131d82f79edc80
|
||||||
1
benchmarks/data/numbers/signed_ints.json.sha256
Normal file
1
benchmarks/data/numbers/signed_ints.json.sha256
Normal file
@ -0,0 +1 @@
|
|||||||
|
b405987bced34153c7e304900e975cda604e57a43187c0fbdfe4dabf46bd276d
|
||||||
1
benchmarks/data/numbers/unsigned_ints.json.sha256
Normal file
1
benchmarks/data/numbers/unsigned_ints.json.sha256
Normal file
@ -0,0 +1 @@
|
|||||||
|
bc765ff7580c8a7a46d104ae0846f0ecbd37617669332d299484a5083904a887
|
||||||
Loading…
Reference in New Issue
Block a user