Skip to content

Commit 5df446c

Browse files
committed
run_examples target renamed to assign_examples. Added new target proof_examples, which runs transpiler on all the examples.
1 parent ff45f40 commit 5df446c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

examples/CMakeLists.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
add_custom_target(circuit_examples)
2-
add_custom_target(run_examples)
2+
add_custom_target(assign_examples)
3+
add_custom_target(proof_examples)
34

45
function(add_example example_target)
56
set(prefix ARG)
@@ -48,12 +49,20 @@ function(add_example example_target)
4849
else()
4950
set(binary_name ${example_target}.bc)
5051
endif()
51-
add_custom_target(${example_target}_run
52+
53+
add_custom_target(${example_target}_assign
5254
COMMAND $<TARGET_FILE:assigner> -b ${binary_name} -i ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_INPUT} -c circuit_${example_target}.crct -t assignment_${example_target}.tbl -e pallas
5355
DEPENDS ${example_target} ${ARG_INPUT} $<TARGET_FILE:assigner>
5456
COMMAND_EXPAND_LISTS
5557
VERBATIM)
56-
add_dependencies(run_examples ${example_target}_run)
58+
add_dependencies(assign_examples ${example_target}_assign)
59+
60+
add_custom_target(${example_target}_proof
61+
COMMAND $<TARGET_FILE:transpiler> -m gen-test-proof -i ${CMAKE_CURRENT_SOURCE_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)
65+
add_dependencies(proof_examples ${example_target}_proof)
5766
endfunction()
5867

5968
add_example(arithmetics_example SOURCES arithmetics.cpp INPUT arithmetics.inp)

0 commit comments

Comments
 (0)