Proper way to compile and link against petsc using cmake

132 Views Asked by At

I followed the configuration and installation of PETSc according to https://petsc.org/release/install/install/#installing-with-open-mpi-with-shared-mpi-libraries as a user not root. The basic check went OK according to the log:

Running check examples to verify correct installation
Using PETSC_DIR=/Users/userid/Downloads/petsc/build and PETSC_ARCH=
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
Completed test examples

I am trying to use CMake rather than make files. How could one use the configuration files of petsc. There are two make files variables and rules where all required flags are written there (for linking and compiling).

0

There are 0 best solutions below