use CMake ExternalData for benchmark data files

This commit is contained in:
Théo DELRIEU 2018-09-20 14:30:08 +02:00
parent 423edf0fdb
commit c3d07d39af
No known key found for this signature in database
GPG Key ID: A5A505438C20539A
12 changed files with 18 additions and 65967 deletions

View File

@ -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

View File

@ -0,0 +1 @@
e93247fed3511e025b9f4c7d3a6ab3334c77546401fb1d64f4d558af09506308

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
f83b3b354030d5dd58740c68ac4fecef64cb730a0d12a90362a7f23077f50d78

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
a73e7a883f6ea8de113dff59702975e60119b4b58d451d518a929f31c92e2059

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
a08b769f32b95f426cbc3abafcec65c1a19d3eb544d4ddf320eae142c99efc5d

View File

@ -0,0 +1 @@
b90f67db4b07a23b3f75370d93123d1d107f9fc66d42342d9e131d82f79edc80

View File

@ -0,0 +1 @@
b405987bced34153c7e304900e975cda604e57a43187c0fbdfe4dabf46bd276d

View File

@ -0,0 +1 @@
bc765ff7580c8a7a46d104ae0846f0ecbd37617669332d299484a5083904a887