PALISADE provides a sample CMake file for building your own C++ project that links to the PALISADE library.
The high-level instructions for building projects that use PALISADE are as follows:
- Build and install PALISADE using "make install". This will copy the PALISADE library files and header files to the directory chosen for installation.
- Create the folder for your project on your system.
- Copy CMakeLists.User.txt from the root directory of the git repo to the folder for your project.
- Rename CMakeLists.User.txt to CMakeLists.txt.
- Update CMakeLists.txt to specify the name of the executable and the source code files. For example, include the following line
add_executable( fhe-demo simple-integers.cpp )
- If using MinGW/Windows (skip this step for other platforms), copy PreLoad.cmake from the root directory of the git repo to the folder of your project.
- Create the build directory and cd to it.
mkdir build cd build
- Run "make" to build the executable.
To include a specific module, e.g., core or pke, in your C++ demo, use the main header file for that module, e.g., palisadecore.h or palisade.h. Please see the demos provided for that module for more examples. If your application uses serialization, additional header files will be needed (see the demos with serialization for more details).