libsnark icon indicating copy to clipboard operation
libsnark copied to clipboard

add option IS_LIBSNARK_PARENT

Open riemann89 opened this issue 5 years ago • 0 comments

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:

  • cmake .. does not compile because check, doc target collides with check, doc target defined into libsnark.
  • make test has view of all the test defined libsnark/CMakeLists.txt and will try to execute them.

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

riemann89 avatar Mar 14 '19 16:03 riemann89