Skip to content
Snippets Groups Projects
Forked from pycodegen / pystencils-sfg
72 commits behind the upstream repository.
cli_and_build_system.md 2.82 KiB

Command Line Interface

pystencils-sfg exposes not one, but two command line interfaces: The global CLI offers a few tools meant to be used by build systems, while the generator script command line interface is meant for a build system to communicate with the code generator during on-the-fly generation.

Global CLI

The global CLI may be accessed either through the sfg-cli shell command, or using python -m pystencilssfg.

Generator Script CLI

The [SourceFileGenerator][pystencilssfg.SourceFileGenerator] evaluates a generator script's command line arguments, which can be supplied by the user, but more frequently by the build system.

CMake Integration

pystencils-sfg is shipped with a CMake module for on-the-fly code generation during the CMake build process.

Add the module

To include the module in your CMake source tree, a separate find module is provided. You can use the global CLI to obtain the find module; simply run