---
# System prepended metadata

title: ICON Liskov Build System Integration

---

# ICON Liskov Build System Integration

- Make use of exisiting CMake infrastructure. Execute the `Preprocessor` within `icon4pygen`, meaning no new changes to CMake are required other than a new argument specifying which file to check for preprocessor directives, so the new signature of `add_stencil_gt4py` could be:
  
```cmake
add_stencil_gt4py("atm_dyn_iconam" "mo_nh_diffusion" "mo_nh_diffusion_stencil_01" 4 128)
```

Arguments currently provided to `icon4pygen` arguments are the following:

```
Args:  
    fencil: may be specified as <module>:<member>, where <module> is the dotted name of the containing module        and <member> is the name of the fencil.  
    block_size: refers to the number of threads per block to use in a cuda kernel.  
    levels_per_thread: how many k-levels to process per thread.  
    outpath: represents a path to the folder in which to write all generated code.
```

Additional argument provided:

```
fname_to_preprocess: path to file to preprocess
```

Icon4PyGen will then do the following:

  1. Execute `Preprocessor` on the specified source file.
  2. Generate the `Gridtools` code for the given stencil.  
  3. Generate the Fortran bindings code using `PyBindGen`.
