Skip to content

Cleaning up Wavewatch CMake code #1069

@mathomp4

Description

@mathomp4

As noted to me by @adarmenov, the current wavewatch CMake control file:

https://github.com/GEOS-ESM/GEOSgcm_GridComp/blob/develop/GEOSwgcm_GridComp/GEOSwavewatch_GridComp/ww3_multi_esmf/CMakeLists.txt

has some unneeded duplication:

set (switch_strings   "NOGRB DIST MPI SCRIP PR3 UQ FLX0 LN1 FLD2 ST4 STAB0 NL1 BT1 DB1 MLIM TR0 BS0 XX0 WNX0 WNT0 CRX0 CRT0 O0 O1 O2 O3 O4 O5 O6 O7 IC0 IS0 REF0" )
...
list (APPEND defs 
    W3_NOGRB
    W3_DIST
    W3_MPI
...
    W3_IC0
    W3_IS0
    W3_REF0
)

As can be seen, both switch_strings and defs have the same info, just one is in a long string, the other is in a list with W3_ in front.

I think it should be fairly simple to convert switch_strings into defs with a few CMake bits.

But, a query for @adarmenov: How would you like this? Should defs just transform switch_strings or would you prefer there to be some "master" list of switches that is turned into both switch_strings and defs?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions