File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 11set (INPUTS_DIR ${CMAKE_CURRENT_SOURCE_DIR} /inputs)
22
3+ function (assign_ir target binary_name input )
4+ add_custom_target (${target} _assign
5+ COMMAND $<TARGET_FILE:assigner> -b ${binary_name} -i ${INPUTS_DIR} /${input} -c circuit_${target} .crct -t assignment_${target} .tbl -e pallas --check
6+ DEPENDS ${target} ${INPUTS_DIR} /${input} $<TARGET_FILE:assigner>
7+ COMMAND_EXPAND_LISTS
8+ VERBATIM )
9+ endfunction ()
10+
11+ function (gen_proof target input )
12+ add_custom_target (${target} _prove
13+ COMMAND $<TARGET_FILE:transpiler> -m gen-test -proof -i ${INPUTS_DIR} /${input} -c circuit_${target} .crct -t assignment_${target} .tbl -o .
14+ DEPENDS ${target} ${INPUTS_DIR} /${input} $<TARGET_FILE:transpiler>
15+ COMMAND_EXPAND_LISTS
16+ VERBATIM )
17+ endfunction ()
18+
319add_subdirectory (cpp)
Original file line number Diff line number Diff line change @@ -50,18 +50,10 @@ function(add_example example_target)
5050 set (binary_name ${example_target} .bc)
5151 endif ()
5252
53- add_custom_target (${example_target} _assign
54- COMMAND $<TARGET_FILE:assigner> -b ${binary_name} -i ${INPUTS_DIR} /${ARG_INPUT} -c circuit_${example_target} .crct -t assignment_${example_target} .tbl -e pallas --check
55- DEPENDS ${example_target} ${ARG_INPUT} $<TARGET_FILE:assigner>
56- COMMAND_EXPAND_LISTS
57- VERBATIM )
53+ assign_ir(${example_target} ${binary_name} ${ARG_INPUT} )
5854 add_dependencies (assign_cpp_examples ${example_target} _assign)
5955
60- add_custom_target (${example_target} _prove
61- COMMAND $<TARGET_FILE:transpiler> -m gen-test -proof -i ${INPUTS_DIR} /${ARG_INPUT} -c circuit_${example_target} .crct -t assignment_${example_target} .tbl -o .
62- DEPENDS ${example_target} ${ARG_INPUT} $<TARGET_FILE:transpiler>
63- COMMAND_EXPAND_LISTS
64- VERBATIM )
56+ gen_proof(${example_target} ${ARG_INPUT} )
6557 add_dependencies (prove_cpp_examples ${example_target} _prove)
6658endfunction ()
6759
You can’t perform that action at this time.
0 commit comments