To generate Debian packages, make sure to set the following variables:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -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 ./libprecice2.2.0.deb
In case you want to remove this package, use your package manager:
sudo apt purge libprecice2.2.0.
To build preCICE as a static library, you can set
-DBUILD_SHARED_LIBS=OFF or simply omit the option.
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
We highly discourage you to do this, as the resulting binaries will not be compatible with C or Fortran adapters!
BOOST_ROOTas described in the CMake documentation
EIGEN3_INCLUDE_DIRbeing the root of the repository.
JSON_INCLUDE_DIRthis expects the scoped include to work
PRETTYPRINT_INCLUDE_DIRthis expects the scoped include to work
- Environment variables
NumPy_INCLUDE_DIR(the two latter are often identical)
MPI - Build preCICE using non-default MPI implementation
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 -DBUILD_SHARED_LIBS=ON -DPRECICE_MPICommunication=ON -DMPI_CXX_COMPILER=/usr/bin/mpicxx.mpich ..