From 5acda4b967684d491cda9297fe87102f41c64e30 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 19 Aug 2020 07:09:51 -0600 Subject: [PATCH] error out of cmake if netcdf-c dispatch table wont work for netcdf integration --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 667e38c544c..03082b35be1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,6 +347,9 @@ CHECK_C_SOURCE_COMPILES(" int main() {return 0;}" HAVE_DISPATCH2) if (NETCDF_INTEGRATION) + if (NOT HAVE_DISPATCH2) + message (FATAL_ERROR "Need newer version of netcdf-c for netcdf integration feature, please upgrade your netCDF library") + endif () set(HAVE_NETCDF_INTEGRATION 1) else () set(HAVE_NETCDF_INTEGRATION 0)