This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move vega spec definitions into their own files
* Move viz compilation into viz dir * Replace single-line strings with proper json files * Use `xxd -i` to generate C++ headers for the JSON files * Clean up the code in vega_spec.cpp
- Loading branch information
Showing
20 changed files
with
4,042 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
project(unity) | ||
|
||
make_library( | ||
visualization | ||
SOURCES | ||
boxes_and_whiskers.cpp | ||
categorical_heatmap.cpp | ||
groupby.cpp | ||
heatmap.cpp | ||
histogram.cpp | ||
hyperloglog.cpp | ||
io_buffer.cpp | ||
item_frequency.cpp | ||
process_wrapper.cpp | ||
scatter.cpp | ||
show.cpp | ||
thread.cpp | ||
transformation.cpp | ||
vega_data.cpp | ||
vega_spec.cpp | ||
REQUIRES | ||
EXTERNAL_VISIBILITY | ||
) | ||
|
||
set(GENERATED_VEGA_JSON_HEADERS | ||
vega_spec/boxes_and_whiskers.json | ||
vega_spec/categorical.json | ||
vega_spec/categorical_heatmap.json | ||
vega_spec/heatmap.json | ||
vega_spec/histogram.json | ||
vega_spec/scatter.json | ||
vega_spec/summary_view.json | ||
) | ||
|
||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/vega_spec) | ||
|
||
foreach(SOURCE_FILE ${GENERATED_VEGA_JSON_HEADERS}) | ||
|
||
string( | ||
REGEX REPLACE | ||
".json$" | ||
".h" | ||
GENERATED_FILE | ||
${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_FILE} | ||
) | ||
|
||
add_custom_command( | ||
OUTPUT ${GENERATED_FILE} | ||
COMMAND xxd -i ${SOURCE_FILE} > ${GENERATED_FILE} | ||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMENT "Generating ${GENERATED_FILE}" | ||
VERBATIM | ||
) | ||
|
||
string( | ||
MAKE_C_IDENTIFIER | ||
${SOURCE_FILE} | ||
TARGET_NAME | ||
) | ||
|
||
add_custom_target( | ||
Generate_${TARGET_NAME} | ||
DEPENDS | ||
${GENERATED_FILE} | ||
) | ||
|
||
add_dependencies(visualization Generate_${TARGET_NAME}) | ||
|
||
endforeach(SOURCE_FILE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.