Skip to content

pierre-24/libcint-meson

Repository files navigation

libcint (Meson wraps)

This project create ready-to-go archives and corresponding wrap files of libcint for your Meson builds.

The different wraps are available with corresponding archives here (pre-releases versions are available here, but their hash changes without notice).

Note that extra integrals are enabled in order for the code to be used in some projects (stdlite and stda), but this should not prevent you from using it.

Usage

Just grab the wrap file corresponding to the version you want to use ...

# in your super project root folder

# create a `subprojects` folder if it does not exists yet
mkdir subprojects

# download wrap file, here for libcint v6.1.2:
wget https://github.com/pierre-24/libcint-meson/releases/download/v0.3.0/libcint_v6.1.2.wrap -O subprojects/libcint.wrap

... and add something like this in your meson.build:

cc = meson.get_compiler('c')

libcint_dep = cc.find_library('libcint', required: false)
if not libcint_dep.found()
  libcint_proj = subproject('libcint', default_options: [])
  libcint_dep = libcint_proj.get_variable('libcint_dep')
endif
project_dep += libcint_dep

You can check out the options in meson_options.txt

Development

To use the different scripts, you need clisp, meson, ninja and cmake. They are most probably available in your favorite package manager.

generate.sh is the script used to generate the archive and wrap file. In practice, it:

  1. downloads libcint,
  2. applies the patch,
  3. re-generates the integrals with scripts/auto_intor.cl,
  4. adds the Meson files, and
  5. generates both the archive and wrap file.

You can run that script locally to explore the modifications.

tests.sh is the script used to run a test suite. In practice, each folder in for-tests that starts with test_meson is:

  1. copied in a testing folder, then
  2. a subproject/libcint folder is filled with the previously created archive, then
  3. meson setup and meson compile ensue, and then
  4. the output of the resulting program (by convention, test_libcint) is compared with EXPECTED (it should match).