Debian packages
To generate Debian packages, make sure to set the following variables:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make -j $(nproc) package
The directory should now contain a .deb package and the corresponding checksum file.
You can install this using your package manager (to be able to remove properly): sudo apt install ./libprecice3.3.0.deb
In case you want to remove this package, use your package manager: sudo apt purge libprecice3.3.0.
Static library
To build preCICE as a static library, you can set -DBUILD_SHARED_LIBS=OFF.
This is not recommended or supported by the preCICE developers! You may contribute here (better support is coming soon).
Disabling native bindings
The library provides native bindings for C and Fortran.
They are called native as they are compiled into the resulting library.
If you know what you are doing, you can disable them by specifying -DPRECICE_BINDINGS_C=OFF, or -DPRECICE_BINDINGS_FORTRAN=OFF.
We highly discourage you to do this, as the resulting binaries will not be compatible with C or Fortran adapters!
Overriding dependencies
BOOST
BOOST_ROOTas described in the CMake documentation
Eigen3
EIGEN3_INCLUDE_DIRbeing the root of the repository.
LibXML2
LIBXML2_LIBRARIESandLIBXML2_INCLUDE_DIRS
JSON
JSON_INCLUDE_DIRthis expects the scoped include to work#include <nlohmann/json.hpp
Prettyprint
PRETTYPRINT_INCLUDE_DIRthis expects the scoped include to work#include <prettyprint/prettyprint.hpp
PETSc
- Environment variables
PETSC_DIRandPETSC_ARCH.
Python
PYTHON_LIBRARY,PYTHON_INCLUDE_DIR,NumPy_INCLUDE_DIR(the two latter are often identical)
MPI - Build preCICE using non-default MPI implementation
- Set
CXXto the compiler wrapper if you want to be sure that the right installation is picked.
For using a non-default MPI implementation one can steer the CMake MPI discovery by setting the variable MPI_CXX_COMPILER to the path to the mpicxx compiler wrapper shipped with your MPI distribution of choice.
Example - building with MPICH:
cmake -DPRECICE_FEATURE_MPI_COMMUNICATION=ON -DMPI_CXX_COMPILER=/usr/bin/mpicxx.mpich ..