wrf-model / WRF

The official repository for the Weather Research and Forecasting (WRF) model
Other
1.24k stars 677 forks source link

CMake confcheck switch to try_* functions #2090

Open islas opened 1 month ago

islas commented 1 month ago

TYPE: enhancement

KEYWORDS: cmake, configuration

SOURCE: internal

DESCRIPTION OF CHANGES: Problem: The configuration checks done by the CMake build use language-specific calls between various functions. This has lead to a rather complex signature that is also limited in scope.

Solution: Simplify the wrf_conf_check calls to make use of CMake's built-in try_compile() and try_run() functions, forwarding argument to those as necessary. Aside from minor adjustments to the wrf_conf_check calls this should appear as a drop-in replacement that provides the same results as before, i.e. no change to the system configuration options detected.

islas commented 1 month ago

Requires #2056, #2053, #2086, #2087, and #2088