[petsc-users] How to use cmake to get external libraries?

Jed Brown jed at jedbrown.org
Thu May 29 01:49:26 CDT 2014


Ce Qin <qince168 at gmail.com> writes:
> The find modules of many scientific libraries are not available. 

I'm sorry, but this is their problem (or your problem, or CMake's
problem).  PETSc provides interfaces to many other packages, but we
can't support every aspect of direct use of those packages.

It's easy to make my FindPETSc.cmake use the full list of libraries, but
I won't make that change and I won't support that use.  I.e., if you are
going to tangle dependencies like that, I'm not the one responsible for
supporting it.

> I also considered using Makefile to build my project, but writing a
> extensible Makefile (supporting out-of-source build) is not easy to
> do.

Makefiles with out-of-source support are not difficult, at least if you
use gnumake.  The PETSc build (in 'master') is one example.  Here is one
for a simpler project:

  https://bitbucket.org/hpgmg/hpgmg/src

Look at base.mk and local.mk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140529/48419c2c/attachment.pgp>


More information about the petsc-users mailing list