NOAA-OWP / evapotranspiration

Other
3 stars 9 forks source link

Rename 'struct bmi' to not conflict with declarations from BMI headers #38

Closed PhilMiller closed 4 months ago

PhilMiller commented 4 months ago

In service of NOAA-OWP/ngen#831, I encountered a name conflict between struct bmi here and namespace bmi from the BMI C++ header:

[ 31%] Building CXX object CMakeFiles/sft_pframework.dir/src/main_pseudo_framework.cxx.o
In file included from /home/runner/work/SoilFreezeThaw/SoilFreezeThaw/src/main_pseudo_framework.cxx:13:
/home/runner/work/SoilFreezeThaw/SoilFreezeThaw/extern/evapotranspiration/include/pet.h:214:8: error: ‘struct bmi’ redeclared as different kind of entity
  214 | struct bmi
      |        ^~~
In file included from /home/runner/work/SoilFreezeThaw/SoilFreezeThaw/src/main_pseudo_framework.cxx:5:
/home/runner/work/SoilFreezeThaw/SoilFreezeThaw/src/../bmi/bmi.hxx:13:11: note: previous declaration ‘namespace bmi { }’
   13 | namespace bmi {
      |           ^~~

We should not have things named simply bmi to avoid conflicts like this.

Changes

Testing

  1. CI

Checklist

PhilMiller commented 4 months ago

I can't directly add reviewers due too permissions issues, but @aaraney @SnowHydrology @madMatchstick could one of you please approve and merge this? I don't think it will impact anything outside this repo, so no coordination needed.