NCAR / wrf_hydro_nwm_public

WRF-Hydro model code
https://ral.ucar.edu/projects/wrf_hydro
Other
181 stars 139 forks source link

CMake build system requires a C++ compiler, although WRF-Hydro does not #585

Open rcabell opened 3 years ago

rcabell commented 3 years ago

When running the initial CMake configuration step, an MPI C++ compiler is used to check for expected behavior. On systems not having a C++ compiler installed, this requires installing one to pass this step, even though C++ is not used in WRF-Hydro.

Expected Behavior

Building the WRF-Hydro model should not require the presence of a C++ compiler

Current Behavior

Attempting to do initial configuration of WRF-Hydro with CMake on a system without a C++ compiler results in this error, and building halts:

    --------------------------------------------------------------------------
    The Open MPI wrapper compiler was unable to find the specified compiler
    g++ in your PATH.

    Note that this compiler was either specified at configure time or in
    one of several possible environment variables.
    --------------------------------------------------------------------------

Possible Solution

Update CMakeLists.txt to only check for an MPI Fortran compiler.

Your Environment

• CMake 3.18.4 • GFortran 10.2 • OpenMPI 4.1.0