[petsc-dev] CMake: make, install, find_package ?

Jed Brown jed at jedbrown.org
Sun Nov 5 10:01:27 CST 2017


Satish Balay <balay at mcs.anl.gov> writes:

> On Sun, 5 Nov 2017, Franck Houssen wrote:
>
>> Personal opinion: either you decide to have a fresh look at this (things may be better now), or, you should unplug the generation of CMakeLists.txt (misleading). 
>
> Hm - configure prints at the end:
>
> xxx=========================================================================xxx
>  Configure stage complete. Now build PETSc libraries with (gnumake build):
>    make PETSC_DIR=/home/balay/petsc PETSC_ARCH=arch-linux2-c-debug all
> xxx=========================================================================xxx
>
> So there is no reference to cmake build here - and nothing misleading.
>
> Sure - if you hunt arround the PETSc source tree - you will find bunch
> of stuff.. [but that would be ignoring the primary doc].
>
> Also There was some reason Jed didn't want to strip out the cmake
> stuff. Perhaps FindPETSc.cmake uses it?

No, FindPETSc does not use it.  And I would recommend using CMake's
pkg-config instead of FindPETSc if you have a current version of PETSc.

I think the reason for not stripping it entirely was that theoretically
it could be useful for IDE integration and/or a native Windows build.
Should probably delete it to avoid confusing someone that is grepping
around.


Franck, we've had a number of problems over the years with CMake
seg-faulting and going into infinite loops in some reconfiguration
scenarios.  Possible to work around, but we were fielding frequent
support emails due to CMake bugs and installation problems.  The build
got faster, more accurate, and simpler when we switched to GNU Make.
And the support emails stopped.  You're welcome to use CMake, but we are
not fans.


More information about the petsc-dev mailing list