add dependency for rules file

This commit is contained in:
Matthias Hochsteger 2021-04-30 18:33:55 +02:00
parent 49736c80a0
commit 786013c857

View File

@ -5,10 +5,11 @@ set(rules hexrules prismrules2 pyramidrules pyramidrules2 quadrules tetrules tri
foreach(rule ${rules}) foreach(rule ${rules})
list(APPEND rules_sources rule_${rule}.cpp) list(APPEND rules_sources rule_${rule}.cpp)
set(rule_file ${CMAKE_CURRENT_SOURCE_DIR}/../../rules/${rule}.rls)
add_custom_command(OUTPUT rule_${rule}.cpp add_custom_command(OUTPUT rule_${rule}.cpp
COMMAND makerls ${CMAKE_CURRENT_SOURCE_DIR}/../../rules/${rule}.rls rule_${rule}.cpp ${rule} COMMAND makerls ${rule_file} rule_${rule}.cpp ${rule}
DEPENDS makerls DEPENDS makerls ${rule_file}
) )
endforeach() endforeach()