Skip to content

Commit b5dd144

Browse files
committed
fix #193: remove Brotli headers from repo
1 parent 454c4c9 commit b5dd144

9 files changed

Lines changed: 30 additions & 1039 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ _buildconfig.py
66
target/
77
Cargo.lock
88
rules/rustls/rustls.h
9+
rules/brotli/brotli/
910

1011
# Python
1112
*.pyc

‎CMakeLists.txt‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ add_custom_target("format"
8686
COMMAND cargo +${RUST_NIGHTLY_VERSION} fmt --manifest-path ${PROJECT_SOURCE_DIR}/rule-preprocessor/Cargo.toml
8787
COMMAND cargo +${RUST_STABLE_VERSION} fmt --manifest-path ${PROJECT_SOURCE_DIR}/libcc2rs/Cargo.toml
8888
COMMAND cargo +${RUST_STABLE_VERSION} fmt --manifest-path ${PROJECT_SOURCE_DIR}/libcc2rs-macros/Cargo.toml
89-
COMMAND cargo +${RUST_STABLE_VERSION} clippy --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
89+
COMMAND cargo +${RUST_STABLE_VERSION} clippy --release --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
9090
--manifest-path ${PROJECT_SOURCE_DIR}/rules/Cargo.toml -- -Dwarnings
91-
COMMAND cargo +${RUST_NIGHTLY_VERSION} clippy --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
91+
COMMAND cargo +${RUST_NIGHTLY_VERSION} clippy --release --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
9292
--manifest-path ${PROJECT_SOURCE_DIR}/rule-preprocessor/Cargo.toml -- -Dwarnings
93-
COMMAND cargo +${RUST_STABLE_VERSION} clippy --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
93+
COMMAND cargo +${RUST_STABLE_VERSION} clippy --release --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
9494
--manifest-path ${PROJECT_SOURCE_DIR}/libcc2rs/Cargo.toml -- -Dwarnings
95-
COMMAND cargo +${RUST_STABLE_VERSION} clippy --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
95+
COMMAND cargo +${RUST_STABLE_VERSION} clippy --release --fix --allow-dirty --allow-no-vcs --allow-staged --all-targets --all-features
9696
--manifest-path ${PROJECT_SOURCE_DIR}/libcc2rs-macros/Cargo.toml -- -Dwarnings
9797
COMMAND ${RUFF} --silent check --fix ${PYTHON_SOURCES}
9898
COMMAND ${RUFF} --silent format ${PYTHON_SOURCES}
@@ -140,6 +140,11 @@ add_custom_target("check"
140140
set(RULES_IR_DIR "${CMAKE_BINARY_DIR}/rules")
141141

142142
set(RUSTLS_HEADER "${PROJECT_SOURCE_DIR}/rules/rustls/rustls.h")
143+
set(BROTLI_HEADERS
144+
"${PROJECT_SOURCE_DIR}/rules/brotli/brotli/decode.h"
145+
"${PROJECT_SOURCE_DIR}/rules/brotli/brotli/encode.h"
146+
"${PROJECT_SOURCE_DIR}/rules/brotli/brotli/port.h"
147+
"${PROJECT_SOURCE_DIR}/rules/brotli/brotli/types.h")
143148

144149
set(PREPROCESSOR_BIN "${CMAKE_BINARY_DIR}/target_preprocessor/release/rule-preprocessor")
145150
set(RULES_LIB "${PROJECT_SOURCE_DIR}/rules/target/release/librules.rlib")
@@ -155,7 +160,7 @@ execute_process(
155160
)
156161

157162
add_custom_command(
158-
OUTPUT ${RUSTLS_HEADER} ${RULES_LIB}
163+
OUTPUT ${RUSTLS_HEADER} ${BROTLI_HEADERS} ${RULES_LIB}
159164
COMMAND cargo +${RUST_STABLE_VERSION} build --release
160165
--manifest-path "${PROJECT_SOURCE_DIR}/rules/Cargo.toml"
161166
DEPENDS "${PROJECT_SOURCE_DIR}/rules/build.rs"
@@ -200,7 +205,7 @@ foreach(_rule_dir IN LISTS rule_subdirs)
200205
OUTPUT ${_cpp_out}
201206
COMMAND ${CMAKE_COMMAND} -E make_directory ${_out_dir}
202207
COMMAND $<TARGET_FILE:cpp-rule-preprocessor> --dir ${_rule_dir} --out ${_cpp_out} ${_cxxflags}
203-
DEPENDS ${_cpp_srcs} ${_cxxflags_file} ${PROJECT_SOURCE_DIR}/cpp2rust/cpp_rule_preprocessor.cpp ${RUSTLS_HEADER}
208+
DEPENDS ${_cpp_srcs} ${_cxxflags_file} ${PROJECT_SOURCE_DIR}/cpp2rust/cpp_rule_preprocessor.cpp ${RUSTLS_HEADER} ${BROTLI_HEADERS}
204209
VERBATIM
205210
)
206211
list(APPEND cpp_rules_ir_outputs ${_cpp_out})
@@ -243,5 +248,6 @@ set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES
243248
"${PROJECT_SOURCE_DIR}/libcc2rs-macros/target"
244249
"${PROJECT_SOURCE_DIR}/libc-dep/target"
245250
"${PROJECT_SOURCE_DIR}/rules/target"
251+
"${PROJECT_SOURCE_DIR}/rule-preprocessor/target"
246252
"${CMAKE_BINARY_DIR}/target_preprocessor"
247253
)

0 commit comments

Comments
 (0)