From d8bff5c95175c275ba6653f5bb78f67e8ec71bf1 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 14 Jul 2020 13:11:16 -0600 Subject: [PATCH] add pio_meta.h.in --- CMakeLists.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c93dfbfb50d..45a53dd9e66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,6 +258,36 @@ if (PIO_ENABLE_DOC) add_subdirectory (doc) endif () +# Include this so we can check values in netcdf_meta.h. +INCLUDE(CheckCSourceCompiles) +INCLUDE(FindNetCDF) +find_package (NetCDF REQUIRED) +find_package (PnetCDF) + + +SET(STATUS_PNETCDF PnetCDF_C_FOUND) + +### +# Check to see if szip write capability is present in netcdf-c. +### +SET(CMAKE_REQUIRED_INCLUDES ${NetCDF_C_INCLUDE_DIR}) +CHECK_C_SOURCE_COMPILES(" +#include +#if !NC_HAS_SZIP_WRITE + choke me +#endif +int main() {return 0;}" HAVE_SZIP_WRITE) + +### +# Check to see if szip write capability is present in netcdf-c. +### +CHECK_C_SOURCE_COMPILES(" +#include +#if !NC_HAS_PAR_FILTERS + choke me +#endif +int main() {return 0;}" HDF5_HAS_PAR_FILTERS) + ##### # Configure and print the libpio.settings file. #####