aradi / fypp

Python powered Fortran preprocessor
http://fypp.readthedocs.io
BSD 2-Clause "Simplified" License
188 stars 30 forks source link

Add native cmake support #28

Open LecrisUT opened 1 year ago

LecrisUT commented 1 year ago

This provides helpful cmake interfaces:

The project is structured such that users can include fypp via FetchContent, e.g.:

cmake_minimum_required(VERSION 3.11)
project(test_fypp LANGUAGES Fortran)

FetchContent_Declare(
  Fypp
  # Pointing to my fork until it is merged
  GIT_REPOSITORY https://github.com/LecrisUT/fypp
  GIT_TAG cmake/cmake
)
FetchContent_MakeAvailable(Fypp)

Fypp_add_executable(test_fypp main.fypp)

Depends on #27, #29

LecrisUT commented 1 year ago

Going to wait for #27 and #29 because it is better to handle the call with python -m fypp