Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ To compile and run the tests for this library, run:

$ make check

To compile and run the gadgetlib2 tutorial, run:

$ make gadgetlib2_tutorial
$ ./libsnark/gadgetlib2_tutorial

### Using libsnark as a library

To develop an application that uses libsnark, it's recommended to use your own build system that incorporates libsnark and dependencies. If you're using CMake, add libsnark as a git submodule, and then add it as a subdirectory. Then, add `snark` as a library dependency to the appropriate rules.
Expand Down
15 changes: 15 additions & 0 deletions libsnark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,21 @@ target_link_libraries(
gtest_main
)

add_executable(
gadgetlib2_tutorial
EXCLUDE_FROM_ALL

gadgetlib2/examples/tutorial.cpp
gadgetlib2/examples/simple_example.cpp
gadgetlib2/examples/simple_example.hpp
)
target_link_libraries(
gadgetlib2_tutorial

snark
gtest_main
)

add_executable(
relations_qap_test
EXCLUDE_FROM_ALL
Expand Down