Skip to content

Commit 533a81a

Browse files
committed
example-cxx works on Mac!
Using the global environment file, I was able to run most of the example and successfully test the BMI down to the end of https://babelizer.readthedocs.io/en/mdpiper-add-cxx-example/example-cxx.html#test-the-bmi. csdms/babelizer#105
1 parent 8501507 commit 533a81a

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

environment.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
name: wrap-all
33
channels:
44
- conda-forge
5+
- nodefaults # Speeds solving env, by limiting the number of options
56
dependencies:
7+
# From examples in https://babelizer.readthedocs.io/en/mdpiper-add-cxx-example/
68
- python>=3.10
79
- make
810
- cmake
@@ -11,11 +13,13 @@ dependencies:
1113
- bmi-c
1214
- cxx-compiler
1315
- bmi-cxx
14-
# - fortran-compiler
15-
# - bmi-fortran
16+
- fortran-compiler
17+
- bmi-fortran
1618
# - babelizer # installs latest release. pip install below for dev
1719
- bmi-tester
18-
- pymt>=1.3
20+
# - pymt>=1.3 # Not installing for now, until it gets updated
21+
22+
# other dependancies to improve build workflow
1923
- gimli.units=0.3.1 # Before reorg (https://github.com/mcflugen/gimli/pull/18)
2024
# to prevent import error with pymt=1.3.1
2125

@@ -26,4 +30,5 @@ dependencies:
2630
- pip
2731
- pip:
2832
# - -e git+https://github.com/csdms/babelizer.git@develop # installs head of branch
33+
# install head of `mdpiper/add-cxx-example` branch:
2934
- git+https://github.com/csdms/babelizer.git#111ed1b0f62e0a20ba373a465914ccbb5b17adb6

example-cxx/babel_heatcxx.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://babelizer.readthedocs.io/ for more information
2+
3+
# Describe the library being wrapped.
4+
[library.HeatCxx]
5+
language = "c++"
6+
library = "bmiheatcxx"
7+
header = "bmi_heat.hxx"
8+
entry_point = "BmiHeat"
9+
10+
# Describe compiler options need to build the library being wrapped.
11+
[build]
12+
undef_macros = []
13+
define_macros = []
14+
libraries = []
15+
library_dirs = []
16+
include_dirs = []
17+
extra_compile_args = []
18+
19+
# Describe the newly wrapped package.
20+
[package]
21+
name = "pymt_heatcxx"
22+
requirements = []
23+
24+
[info]
25+
github_username = "pymt-lab"
26+
package_author = "csdms"
27+
package_author_email = "[email protected]"
28+
package_license = "MIT License"
29+
summary = "PyMT component for the C++ heat model"
30+
31+
[ci]
32+
python_version = [
33+
"3.10",
34+
"3.11",
35+
"3.12",
36+
]
37+
os = [
38+
"linux",
39+
"mac",
40+
"windows",
41+
]

example-cxx/test/config.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.5, 8.0, 6, 5

0 commit comments

Comments
 (0)