xref: /petsc/doc/developers/development.md (revision 6dd63270497ad23dcf16ae500a87ff2b2a0b7474)
1(development)=
2
3# PETSc Development Environment
4
5In the course of developing PETSc, you may find the following useful in setting up your
6build and development environment.
7
8## Influential `configure` flags
9
10- `--with-strict-petscerrorcode`:
11
12  This makes `PetscErrorCode` non-discardable (see `PETSC_NODISCARD`) in order to
13  catch instances of missing `PetscCall()` and friends. For this reason it is *highly
14  encouraged* that you `configure` with this option. CI will already have it enabled,
15  doing so locally will save you the pain of re-running it.
16
17  For the vast majority of cases (this includes C++ constructors/destructors!), you must
18  fix discarded `PetscErrorCode` warnings by wrapping your call in the appropriate
19  `PetscCall()` variant. If you are choosing to intentionally silence the warnings by
20  ignoring the return code you may do so in the following way:
21
22  ```
23  PetscErrorCode ierr;
24
25  ierr = SomePetscFunction(); // OK, capturing result
26  (void)ierr; // to silence set-but-not-used warnings
27  ```
28
29## Editor Integrations
30
31### Emacs
32
33TODO
34
35### Vim
36
37TODO
38