-
Notifications
You must be signed in to change notification settings - Fork 179
Building
The build process requires the CMake cross-platform build system. This should make RELIC available in all platforms supported by CMake. Depending on the configuration the GMP library might also be needed.
Presets are predefined configurations that match common targets relevant in practice. Presets were not designed to provide full configurations or to fix bad ones, but only to override some of the defaults and facilitate the build process for well-known parameters. In the steps below, replace <version>
by the release version.
First of all, extract the RELIC release archive:
tar xzvf relic-<version>.tar.gz
This should create a directory named relic-<version>
. Create a target directory:
mkdir -p relic-target
Locate the <preset>
file in the presets
folder and run the following:
cd relic-target
../presets/<preset>.sh ../
make
If you are not using presets, follow the instructions below.
Run cmake
inside the target directory:
cd relic-target
cmake ../relic-<version>
CMake will detect a suitable C compiler and show all the customization options. For now, just compile the library:
make; cd ..
cd ..
By default, static and shared libraries will be built in the relic-target/lib
directory. Tests and benchmarks should be present in relic-target/bin
. You can run the automated tests by running each binary independently or by using CTest:
cd relic-target
ctest
The customization options are described in BuildOptions. You can change these by running:
ccmake relic-target
Installation is not required but can be done with:
make install
By default, CMake installs binaries and headers into the /usr/local/
prefix. You can change this by passing a DESTDIR=
variable along with the make install
command.
In case of errors, please contact the developers through the discussion group.