Open DusanJovic-NOAA opened 3 years ago
At the end of FindESMF.cmake
we should add something like:
# Check package has been found correctly
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
ESMF
REQUIRED_VARS
esmf_lib
VERSION_VAR ESMF_VERSION_STRING
)
The CMakeModules you are looking at is out of date. find_package_handle_standard_args
is there, though the original bug still exists, but it would fail because the vars aren't set.
If
ESMFMKFILE
environment variable is set but points to a non-existent file, FindESMF silently returns even if in the application it is marked as required package. This fatal error message:should depend on whether or not file that
ESMFMKFILE
points to exists, not whether variableESMFMKFILE
is defined.