Build system ============ pybFoam is built with `scikit-build-core`_ driving CMake and `nanobind`_. This page documents the environment variables, CMake options, and CMake targets you may need to know about when building or packaging pybFoam. .. _scikit-build-core: https://scikit-build-core.readthedocs.io/ .. _nanobind: https://nanobind.readthedocs.io/ Required environment -------------------- ``cmake/FindOpenFOAM.cmake`` is a hard gate: configuration fails immediately if any of these environment variables are unset. Sourcing ``/path/to/OpenFOAM/etc/bashrc`` defines all of them. .. list-table:: :header-rows: 1 :widths: 25 75 * - Variable - Purpose * - ``FOAM_SRC`` - Root of OpenFOAM source headers; used to find ``fvCFD.H`` and every ``lnInclude/`` directory. * - ``FOAM_LIBBIN`` - Directory containing the built OpenFOAM shared libraries (``libOpenFOAM.so``, ``libfiniteVolume.so``, …). * - ``WM_LABEL_SIZE`` - Integer label size (32 or 64). Compiled in as ``-DWM_LABEL_SIZE=`` — must match the OpenFOAM build. * - ``WM_PRECISION_OPTION`` - Floating-point precision (``SP``, ``DP``, ``SPDP``). Compiled in as ``-DWM_