Skip to content

Commit 96eedc9

Browse files
committed
Merge branch 'master' into in-class-initializer
2 parents 77a11f1 + 360a2a5 commit 96eedc9

256 files changed

Lines changed: 15721 additions & 2050 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CMakeLists.txt‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,20 @@ foreach(_rule_dir IN LISTS rule_subdirs)
153153
get_filename_component(_rule_name ${_rule_dir} NAME)
154154
set(_out_dir ${RULES_IR_DIR}/${_rule_name})
155155
set(_out ${_out_dir}/ir_src.json)
156+
set(_cxxflags)
157+
set(_cxxflags_file)
158+
if(EXISTS ${_rule_dir}/cxxflags)
159+
set(_cxxflags_file ${_rule_dir}/cxxflags)
160+
file(STRINGS ${_cxxflags_file} _flags)
161+
foreach(_flag IN LISTS _flags)
162+
list(APPEND _cxxflags --cxxflags=${_flag})
163+
endforeach()
164+
endif()
156165
add_custom_command(
157166
OUTPUT ${_out}
158167
COMMAND ${CMAKE_COMMAND} -E make_directory ${_out_dir}
159-
COMMAND $<TARGET_FILE:cpp-rule-preprocessor> --dir ${_rule_dir} --out ${_out}
160-
DEPENDS ${_srcs} ${PROJECT_SOURCE_DIR}/cpp2rust/cpp_rule_preprocessor.cpp ${RUSTLS_HEADER}
168+
COMMAND $<TARGET_FILE:cpp-rule-preprocessor> --dir ${_rule_dir} --out ${_out} ${_cxxflags}
169+
DEPENDS ${_srcs} ${_cxxflags_file} ${PROJECT_SOURCE_DIR}/cpp2rust/cpp_rule_preprocessor.cpp ${RUSTLS_HEADER}
161170
VERBATIM
162171
)
163172
list(APPEND cpp_rules_ir_outputs ${_out})

0 commit comments

Comments
 (0)