WRF icon indicating copy to clipboard operation
WRF copied to clipboard

CMake check system for underscore requirements between C and Fortran

Open islas opened this issue 6 months ago • 1 comments

TYPE: enhancement

KEYWORDS: cmake, configuration

SOURCE: internal

DESCRIPTION OF CHANGES: Problem: The current solution for implicitly matching symbols between C and Fortran relies on user-modification of a stanza for their system. While stanzas can be configured to a specific architecture and options selection, this approach is limited and overly specific to user configuration when it could be programmatically determined. Likewise, if a new stanza is introduced it will likely only be tested by one user on their particular system. Thus, if this stanza could be used elsewhere but needs underscores on C symbols for Fortran usage it will not be evident why the stanza does not work for this new user.

Solution: Programmatically determine if underscores are needed in C compilation in the CMake build. Sanitize out any definition of underscore in the stanza so that CMake configuration checks take precedence.

islas avatar Aug 06 '24 03:08 islas