pyccel.codegen.build_generation.meson_gen module#
A module to handle everything related to meson for the pyccel make command.
- class pyccel.codegen.build_generation.meson_gen.MesonHandler(pyccel_dir, root_dir, output_dir, *, verbose, debug_mode, compiler, accelerators)[source]#
Bases:
BuildSystemHandlerA class providing the functionalities to handle a meson build system.
A class providing the functionalities to generate meson build system files and compile a meson project.
- Parameters:
pyccel_dir (Path) – The directory where generated files should be outputted.
root_dir (Path) – The directory from which the pyccel make command was called.
output_dir (Path) – The directory where the final files should be outputted.
verbose (int) – The level of verbosity.
debug_mode (bool) – Indicates if we should compile in debug mode.
compiler (pyccel.codegen.compilers.compiling.Compiler) – The compiler that should be used to compile the code.
accelerators (iterable[str]) – Tool used to accelerate the code (e.g., OpenMP, OpenACC).
- generate(expr)[source]#
Generate all meson.build files necessary to describe the project.
Generate all meson.build files necessary to describe the project to meson. With these files it should be possible to compile the project using meson.
- Parameters:
expr (BuildProject) – A BuildProject object describing all necessary build information for the project.