Skip to content

Commit

Permalink
remove "depends/" prefix from include directives in bn128 (#56)
Browse files Browse the repository at this point in the history
* ate-pairing is not part of libff, it's a dependency. using "depends"
in include directives forces lib users to support a particular build
structure, namely one that uses a "depends" subdirectory.  this is undesireable.
  • Loading branch information
mobileink authored Aug 25, 2020
1 parent a5e8970 commit 3a0ae81
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ add_definitions(
enable_testing()

if(${CURVE} STREQUAL "BN128")
include_directories(depends)
add_definitions(
-DBN_SUPPORT_SNARK=1
)
Expand Down
1 change: 1 addition & 0 deletions libff/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(FF_EXTRASRCS)
set(FF_EXTRALIBS)
if(${CURVE} STREQUAL "BN128")
include_directories(depends)
set(
FF_EXTRASRCS

Expand Down
2 changes: 1 addition & 1 deletion libff/algebra/curves/bn128/bn128_g1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define BN128_G1_HPP_
#include <vector>

#include "depends/ate-pairing/include/bn.h"
#include "ate-pairing/include/bn.h"

#include <libff/algebra/curves/bn128/bn128_init.hpp>
#include <libff/algebra/curves/curve_utils.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libff/algebra/curves/bn128/bn128_g2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <iostream>
#include <vector>

#include "depends/ate-pairing/include/bn.h"
#include "ate-pairing/include/bn.h"

#include <libff/algebra/curves/bn128/bn128_init.hpp>
#include <libff/algebra/curves/curve_utils.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libff/algebra/curves/bn128/bn128_gt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define BN128_GT_HPP_
#include <iostream>

#include "depends/ate-pairing/include/bn.h"
#include "ate-pairing/include/bn.h"

#include <libff/algebra/fields/field_utils.hpp>
#include <libff/algebra/fields/fp.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libff/algebra/curves/bn128/bn128_init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#ifndef BN128_INIT_HPP_
#define BN128_INIT_HPP_
#include "depends/ate-pairing/include/bn.h"
#include "ate-pairing/include/bn.h"

#include <libff/algebra/curves/public_params.hpp>
#include <libff/algebra/fields/fp.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libff/algebra/curves/bn128/bn128_pairing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#ifndef BN128_PAIRING_HPP_
#define BN128_PAIRING_HPP_
#include "depends/ate-pairing/include/bn.h"
#include "ate-pairing/include/bn.h"

#include <libff/algebra/curves/bn128/bn128_g1.hpp>
#include <libff/algebra/curves/bn128/bn128_g2.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libff/algebra/curves/bn128/bn_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define BN_UTILS_HPP_
#include <vector>

#include "depends/ate-pairing/include/bn.h"
#include "ate-pairing/include/bn.h"

namespace libff {

Expand Down

0 comments on commit 3a0ae81

Please sign in to comment.