I suggest to put it in the root cmake file but also inside a `IF(OGS_USE_PETSC)`-block.