File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
set (SIMDJSON_BENCHMARK_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
2
2
set (EXAMPLE_JSON ${CMAKE_CURRENT_BINARY_DIR} /twitter.json PARENT_SCOPE)
3
3
set (EXAMPLE_NDJSON ${CMAKE_CURRENT_BINARY_DIR} /amazon_cellphones.ndjson PARENT_SCOPE)
4
- add_library (jsonexamples-data INTERFACE )
5
- target_compile_definitions (jsonexamples-data INTERFACE SIMDJSON_BENCHMARK_DATA_DIR="${CMAKE_CURRENT_BINARY_DIR} /" )
6
4
7
5
# Copy static files to the build dir so they live alongside the generated ones
8
6
file (GLOB_RECURSE example_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.json *.ndjson)
@@ -11,3 +9,8 @@ foreach(example_file ${example_files})
11
9
endforeach (example_file)
12
10
13
11
add_subdirectory (generated )
12
+
13
+ add_library (jsonexamples-data INTERFACE )
14
+ target_compile_definitions (jsonexamples-data INTERFACE SIMDJSON_BENCHMARK_DATA_DIR="${CMAKE_CURRENT_BINARY_DIR} /" )
15
+ add_dependencies (jsonexamples-data ${example_files} )
16
+ add_dependencies (jsonexamples-data generated -data)
Original file line number Diff line number Diff line change @@ -11,4 +11,7 @@ if (RUBY_EXECUTABLE)
11
11
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
12
12
)
13
13
add_custom_target (generated -data DEPENDS ${generated_files} )
14
+ else (RUBY_EXECUTABLE)
15
+ # TODO make this work without Ruby and make it part of the normal build
16
+ add_custom_target (generated -data)
14
17
endif (RUBY_EXECUTABLE)
You can’t perform that action at this time.
0 commit comments