cpp_bindgen
cpp_bindgen copied to clipboard
Library for generating C and Fortran bindings for C++ functions from C++
cpp_bindgen is a library to generate C and Fortran bindings for C++ functions from C++. It is part of the GridTools framework, a set of libraries and utilities to develop performance portable applications in the area of weather and climate.
Currently the documentation of cpp_bindgen is part of the GridTools documentation. For simple examples, see the examples folder of this repository. More advanced examples are available in https://github.com/GridTools/gridtools.
Installation instructions
You can easily integrate cpp_bindgen in your CMake project with the following snippet which makes the function bindgen_add_library() available.
include(FetchContent)
FetchContent_Declare(
cpp_bindgen
GIT_REPOSITORY https://github.com/GridTools/cpp_bindgen.git
GIT_TAG master # consider replacing master by a tagged version
)
FetchContent_MakeAvailable(cpp_bindgen)
See also https://github.com/GridTools/cpp_bindgen/tree/master/example/simple_fetch_content.
Requirements
- Boost (1.65.1 or later)
- CMake (3.14.5 or later)
Known issues
- The library doesn't work with NVCC <= 9.2 using Clang as host compiler, if c++14 is enabled, due to a bug in NVCC.
Continuous integration
We use Jenkins to test this library. To test your PR use
launch jenkinsto execute the tests which are part of this repository.launch gridtoolsto run the changes against the GridTools integration tests from the GridTools/gridtools repository.
Contributing
Contributions to the GridTools framework are welcome. Please open an issue for any bugs that you encounter or provide a fix or enhancement as a PR. External contributions to GridTools require us a signed copy of a copyright release form to ETH Zurich. We will contact you on the PR.