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" <[email protected]> > 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 <[email protected]> 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...).
cmake.bundle
Description: Binary data
