Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a C++ example to the documentation #105

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs/source/babel_heatcxx.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://babelizer.readthedocs.io/ for more information

# Describe the library being wrapped.
[library.HeatCxx]
language = "c++"
library = "bmiheatcxx"
header = "bmi_heat.hxx"
entry_point = "BmiHeat"

# Describe compiler options need to build the library being wrapped.
[build]
undef_macros = []
define_macros = []
libraries = []
library_dirs = []
include_dirs = []
extra_compile_args = []

# Describe the newly wrapped package.
[package]
name = "pymt_heatcxx"
requirements = []

[info]
github_username = "pymt-lab"
package_author = "csdms"
package_author_email = "[email protected]"
package_license = "MIT License"
summary = "PyMT component for the C++ heat model"

[ci]
python_version = [
"3.10",
"3.11",
"3.12",
]
os = [
"linux",
"mac",
"windows",
]
14 changes: 14 additions & 0 deletions docs/source/environment-cxx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# A conda environment file for the babelizer C++ example
name: wrap-cxx
channels:
- conda-forge
dependencies:
- python=3
- make
- cmake
- pkg-config
- cxx-compiler
- bmi-cxx
- babelizer
- bmi-tester
- pymt>=1.3
3 changes: 2 additions & 1 deletion docs/source/example-c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Using the *babelizer*, we wrapped the *heat* model, which is written in C.
It can now be called as a *pymt* component in Python.

The steps for wrapping a model with the *babelizer* outlined in this example
can also be applied to models written in C++ and `Fortran`_.
can also be applied to models written in `C++`_ and `Fortran`_.


..
Expand All @@ -365,4 +365,5 @@ can also be applied to models written in C++ and `Fortran`_.
.. _Python Modeling Tool: https://pymt.readthedocs.io
.. _CSDMS Model Metadata: https://github.com/csdms/model_metadata
.. _Descriptions: https://github.com/csdms/model_metadata/blob/develop/README.rst
.. _C++: example-cxx.html
.. _Fortran: example-fortran.html
Loading
Loading