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

Add self extracting executable #35775

Merged
merged 20 commits into from Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions utils/CMakeLists.txt
Expand Up @@ -32,6 +32,7 @@ if (NOT DEFINED ENABLE_UTILS OR ENABLE_UTILS)
add_subdirectory (check-mysql-binlog)
add_subdirectory (keeper-bench)
add_subdirectory (graphite-rollup)
add_subdirectory (self-extr-exec)

if (TARGET ch_contrib::nuraft)
add_subdirectory (keeper-data-dumper)
Expand Down
14 changes: 14 additions & 0 deletions utils/self-extr-exec/CMakeLists.txt
@@ -0,0 +1,14 @@
add_executable (pre_compressor compressor.cpp)
target_link_libraries(pre_compressor PUBLIC ch_contrib::zstd)

add_executable (decompressor decompressor.cpp)
target_link_libraries(decompressor PUBLIC ch_contrib::zstd)

add_custom_target (compressor)
add_dependencies (compressor pre_compressor decompressor)

add_custom_command (TARGET compressor
POST_BUILD
COMMAND cat pre_compressor decompressor > compressor
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/post_build.sh >> compressor
)