Skip to content

[cmake] Added option OGS_INSTALL_PETSC to install petsc into CMAKE_INSTALL_PREFIX

Lars Bilke requested to merge bilke/ogs:install-petsc into master

E.g.:

cmake -S . --preset release-petsc \
  -DCMAKE_INSTALL_PREFIX=../install/release-petsc \
  -DOGS_INSTALL_PETSC=ON
cmake --build --preset release-petsc -t install

Please note that currently the install location is not relocatable! Absoulte path to petsc-lib has to be replaced with an rpath equivalent.

On Mac this works:

install_name_tool -change /Users/bilke/code/ogs/install/release-petsc/lib/libpetsc.3.11.dylib @rpath/libpetsc.3.11.dylib ./ogs

TODO: Linux, maybe with http://manpages.ubuntu.com/manpages/bionic/man1/patchelf.1.html

  1. Feature description was added to the changelog
  2. Tests covering your feature were added? No but this was tested in the wild.

Merge request reports