From 143fb237f93935fb89d349686ca55b8324b2c69f Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Mon, 18 Sep 2017 13:31:15 -0600 Subject: [PATCH] Disabled CDF5 generation support for ncgen if USE_CDF5 is false. --- ncgen/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ncgen/main.c b/ncgen/main.c index ddcdb6881..dd6079ce6 100644 --- a/ncgen/main.c +++ b/ncgen/main.c @@ -498,6 +498,13 @@ main( /* Compute the k_flag (1st pass) using rules in the man page (ncgen.1).*/ +#ifndef USE_CDF5 + if(k_flag == NC_FORMAT_CDF5) { + derror("Output format CDF5 requested, but netcdf was built without cdf5 support."); + return 0; + } +#endif + #ifndef USE_NETCDF4 if(enhanced_flag) { derror("CDL input is enhanced mode, but --disable-netcdf4 was specified during build");