File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,6 +151,10 @@ add_custom_target("check"
151151 DEPENDS check-libcc2rs check-unit
152152 )
153153
154+ add_custom_target ("check-all"
155+ DEPENDS check check-benchmarks
156+ )
157+
154158set (RULES_IR_DIR "${CMAKE_BINARY_DIR } /rules" )
155159
156160file (GLOB rule_subdirs ${PROJECT_SOURCE_DIR } /rules/* )
@@ -201,14 +205,3 @@ add_custom_command(
201205
202206add_custom_target ("preprocess-rust-rules" ALL
203207 DEPENDS ${rust_rules_ir_outputs} )
204-
205- add_custom_target ("check-rules"
206- COMMAND ${CMAKE_COMMAND } -E rm -rf "${RULES_IR_DIR} "
207- COMMAND ${CMAKE_COMMAND } --build ${CMAKE_BINARY_DIR } --target preprocess-cpp-rules
208- COMMAND ${CMAKE_COMMAND } --build ${CMAKE_BINARY_DIR } --target preprocess-rust-rules
209- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR }
210- )
211-
212- add_custom_target ("check-all"
213- DEPENDS check-libcc2rs check-rules check-unit check-benchmarks
214- )
Original file line number Diff line number Diff line change @@ -133,9 +133,6 @@ ninja check-benchmarks
133133# Check benchmark output without executing binaries
134134SKIP_RUN=1 ninja check-benchmarks
135135
136- # Regenerate and check if the IR for the rules changed
137- ninja check-rules
138-
139136# Regenerate expected output for unit tests after intentional changes
140137REPLACE_EXPECTED=1 ninja check-unit
141138```
Original file line number Diff line number Diff line change @@ -103,9 +103,8 @@ static bool HasIRFiles(const fs::path &dir) {
103103}
104104
105105static bool ResolveRulesDir () {
106- std::array<fs::path, 3 > candidates = {fs::path (" ./rules" ),
107- fs::path (" ../rules" ),
108- GetExecutableDir () / " ../rules" };
106+ std::array<fs::path, 2 > candidates = {
107+ fs::path (" ./rules" ), GetExecutableDir ().parent_path () / " rules" };
109108
110109 for (const auto &dir : candidates) {
111110 if (fs::exists (dir) && fs::is_directory (dir) && HasIRFiles (dir)) {
You can’t perform that action at this time.
0 commit comments