diff --git a/config/cmake/s-dftd3-utils.cmake b/config/cmake/s-dftd3-utils.cmake index c1dbe805..a4a7df71 100644 --- a/config/cmake/s-dftd3-utils.cmake +++ b/config/cmake/s-dftd3-utils.cmake @@ -22,6 +22,10 @@ macro( url revision ) + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.20") + list(APPEND CMAKE_MESSAGE_CONTEXT "${package}") + endif() + string(TOLOWER "${package}" _pkg_lc) string(TOUPPER "${package}" _pkg_uc) @@ -109,6 +113,9 @@ macro( unset(_pkg_lc) unset(_pkg_uc) + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.20") + list(POP_BACK CMAKE_MESSAGE_CONTEXT) + endif() if(NOT TARGET "${package}::${package}") message(FATAL_ERROR "Could not find dependency ${package}") diff --git a/doc/installation.rst b/doc/installation.rst index d7baa55f..ae993fd1 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -7,34 +7,34 @@ The preferred method for installing this package is to use a binary release dist If your preferred package manager is not available, you can also download the source code and build it yourself. -Installing from conda ---------------------- +Installing from conda-forge +--------------------------- -This project is packaged for the *conda* package manager and available on the *conda-forge* channel. -To install the *conda* package manager we recommend the `miniforge `_ installer. +This project is packaged for the *mamba* package manager and available on the *conda-forge* channel. +To install the *mamba* package manager we recommend the `miniforge `_ installer. If the *conda-forge* channel is not yet enabled, add it to your channels with .. code-block:: bash - conda config --add channels conda-forge + mamba config --add channels conda-forge Once the *conda-forge* channel has been enabled, this project can be installed with: .. code-block:: bash - conda install simple-dftd3 + mamba install simple-dftd3 If you want to enable the Python API as well install .. code-block:: bash - conda install dftd3-python + mamba install dftd3-python It is possible to list all of the versions available on your platform with: .. code-block:: bash - conda search simple-dftd3 --channel conda-forge + mamba search simple-dftd3 --channel conda-forge Now you are ready to use the ``s-dftd3`` executable, find the ``dftd3.h`` header or import ``dftd3`` in your Python projects. @@ -46,9 +46,19 @@ This library depends on few Fortran modules to provide the desired functionality - `mctc-lib`_: Modular computation tool chain library - `mstore`_: Molecular structure store (testing only) +- `toml-f`_: TOML parser for Fortran + +When building from source the dependencies will be downloaded automatically if not available on the system. +To build offline install the dependencies before building the library or provide the source of the dependencies in the *subprojects* directory. + +.. note:: + + Using the released archive is recommended because it already bundles the source code of all dependencies. + The complete source archive in the release page is named ``s-dftd3-.tar.xz``. .. _mctc-lib: https://github.com/grimme-lab/mctc-lib .. _mstore: https://github.com/grimme-lab/mstore +.. _toml-f: https://toml-f.readthedocs.io .. _meson: https://mesonbuild.com .. _ninja: https://ninja-build.org @@ -153,7 +163,7 @@ After a successful build make sure the testsuite passes .. code:: text - pushd _build && ctest --output-on-failure && popd + ctest --output-on-failure --test-dir _build To make the project available install it with