You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-1Lines changed: 39 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ Below we compare the PinSketch algorithm (which `libminisketch` is an implementa
66
66
***Difference type:** PinSketch can only compute the symmetric difference from a merged sketch, while CPISync and IBLT can distinguish which side certain elements were missing on. When the decoder has access to one of the sets, this generally doesn't matter, as he can look up each of the elements in the symmetric difference with one of the sets.
67
67
***Secure sketch:** Whether the sketch satisfies the definition of a secure sketch<sup>[[1]](#myfootnote1)</sup>, which implies a minimal amount about a set can be extracted from a sketch by anyone who does not know most of the elements already. This makes the algorithm appropriate for applications like fingerprint authentication.
68
68
69
-
## Building
69
+
## Building with Autotools
70
70
71
71
The build system is very rudimentary for now, and [improvements](https://github.com/bitcoin-core/minisketch/pulls) are welcome.
72
72
@@ -78,6 +78,44 @@ cd minisketch
78
78
./autogen.sh && ./configure && make
79
79
```
80
80
81
+
## Building with CMake
82
+
83
+
To maintain a pristine source tree, CMake encourages performing an out-of-source build by using a separate dedicated build directory.
84
+
85
+
### Building on POSIX systems
86
+
87
+
The following commands will produce the same `libminisketch.a` file as in the example [above](#building-with-autotools):
88
+
89
+
```bash
90
+
cmake -B build -DCMAKE_CXX_FLAGS="-g -O2"# Generate a build system in subdirectory "build"
91
+
cmake --build build # Run the actual build process
92
+
ctest --test-dir build # Run the test suite
93
+
sudo cmake --install build # Install the library into the system (optional)
94
+
```
95
+
96
+
Run `cmake -B build -LH` or `ccmake -B build` to see the full list of configurable build options.
97
+
98
+
### Cross compiling
99
+
100
+
The following example works on modern Ubuntu/Debian systems:
0 commit comments