Skip to content

Commit

Permalink
Merge pull request #260 from ZedThree/fail-if-szip-write-missing
Browse files Browse the repository at this point in the history
CMake: Fail if nc_def_var_szip missing
  • Loading branch information
WardF authored May 26, 2020
2 parents 0c3a5fd + a28e5f8 commit c156532
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,11 @@ CHECK_C_SOURCE_COMPILES("
#endif
int main() {return 0;}" HAVE_SZIP_WRITE)

CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nc_def_var_szip "" HAVE_DEF_VAR_SZIP)
if (NOT HAVE_DEF_VAR_SZIP)
message(FATAL_ERROR "netcdf-c version 4.7.4 or greater is required")
endif()

SET(HAS_NC4 FALSE)
IF(USE_NETCDF4)
SET(NC_BUILD_V4 TRUE)
Expand Down

0 comments on commit c156532

Please sign in to comment.