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

Franck Houssen franck.houssen at inria.fr
Mon Nov 6 03:58:33 CST 2017


Looks like you had a bad experience with CMake up to a point of no return (probably a shame, but, I can understand that !).
I will use pkg-config: that's fine to me. I was just trying to help here for sake of community ! No more, no less !

Franck

----- Mail original -----
> De: "Satish Balay" <balay at mcs.anl.gov>
> Its equivalent to assuming:

Yes ! Your friend let you the keys of his car. The car has no wheel. Why did he gave you his keys ?!... :D (joking)

> if 'makefile' exists 'make all && make install' will work.

> > > > Porting a configuration from our Python (BuildSystem) to CMake for
> > > > cross-compilation and all the optional dependencies would be monumental
> > > > task and would result in a portability regression for systems where
> > > > platform files are not yet available.

Yes, you are right. Here is a few solutions you may want to look at (bundle attached - Read commit message)

commit 4ae847ecd17ca4d8cbe5b44709d341a568431e11 (HEAD -> cmake)
Author: Franck HOUSSEN <franck.houssen at inria.fr>
Date:   Mon Nov 6 08:20:14 2017 +0100

    CMake: fix dependencies order (NOT yet working - WIP).
    
    TODO: to get that to work, a simple solution could be to
    modify "./configure" such that it creates:
    .../externalpackages/00.f2cblaslapack-3.4.2.q3
    .../externalpackages/01.scalapack-2.0.2
    instead of what it does currently:
    .../externalpackages/f2cblaslapack-3.4.2.q3
    .../externalpackages/scalapack-2.0.2
    
    This way GLOB_RECURSE comes with the expected link order.
    
    Now, the last problem is reconfiguring. To fix that, a simple
    solution could be to attribute a (hard-coded) number to each
    package in such a way that if a number is greater than yours,
    you don't depend on it (simply list ALL possible packages and
    order them by dependencies). For instance, first configure with
    --download-blas --download-lapack --with-mpi=...
    --download-scalapack and get:
    .../externalpackages/00.f2cblaslapack-3.4.2.q3
    .../externalpackages/05.scalapack-2.0.2
    Now add --download-mpi, and get:
    .../externalpackages/00.f2cblaslapack-3.4.2.q3
    .../externalpackages/03.openmpi
    .../externalpackages/05.scalapack-2.0.2
    
    Reconfiguring can this way add dependencies interleaved in the
    existing set of dependencies.


> > > > 
> > > > > More important: getting find_package to work will be much more
> > > > > reliable than resorting to FindPETSc.cmake (often KO as architecture/OS specific...).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake.bundle
Type: application/octet-stream
Size: 3796 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171106/04154448/attachment.obj>


More information about the petsc-dev mailing list