Skip to content

Draft: Consolidate updates to CMake framework and adapt to master

Alberto Garcia requested to merge garalb/siesta:cmake-master into master

(Ported from 4.1 branch, including Nick's additions)

The search for dependent libraries uses pkgconfig as first choice.

Use the following incantation to configure:

cmake -S. -GNinja -B_build \
   -DCMAKE_PREFIX_PATH="$XMLF90_ROOT;$PSML_ROOT;$GRIDXC_ROOT;$LIBXC_ROOT" \
   -DCMAKE_INSTALL_PREFIX=/path/to/installation

cmake --build _build

   (Optionally followed by  '-- -j 1 -v'  for more info)

For GRIDXC, the search will try 'libgridxc_dp_mpi.pc' if WITH_MPI=ON, or 'libgridxc_dp.pc' for the serial case. This will work in most cases, but in some systems (e.g. IBM's mpi) one would have to use 'mpirun -np 1' for serial utilities linking to GRIDXC (gen-basis, for example).

Fdict and Ncdf are still used in "simplified" forms. These have not yet been updated with the latest upstream changes committed to master.

In order to use the automatic downloading of dependent libraries, these have to be adapted to the new CMake idioms (in particular the search for MPI).

Merge request reports

Loading