scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.81k stars 572 forks source link

add option IS_LIBSNARK_PARENT #145

Open riemann89 opened 5 years ago

riemann89 commented 5 years ago

If we import libsnark as submodule dependency in a project that has his own CMakeLists.txt file, we are not able to define make check or make doc since they are defined yet by libsnark.

More specifically we have these problems:

For these reasons, adding IS_LIBSNARK_PARENT option facilitates the inclusion of libsnark as submodule dependency into a repository without requesting modifications. In the main repository will be enough to define OPTION(IS_LIBFF_PARENT OFF).

This is the same approach used in libsnark dependencies https://github.com/scipr-lab/libsnark/blob/master/depends/CMakeLists.txt