Skip to content

Commit

Permalink
ckp
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Apr 13, 2024
1 parent 07fb37d commit 2a8b6a7
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 73 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ endif()
# Here we disable them completely.
option(NETCDF_ENABLE_NETCDF_4 "Use HDF5." OFF)
option(NETCDF_ENABLE_NETCDF4 "Use HDF5." OFF)
if(NETCDF_ENABLE_HDF5 OR NETCDF_ENABLE_NETCDF_4)
if(NETCDF_ENABLE_NETCDF4 OR NETCDF_ENABLE_NETCDF_4)
message(FATAL_ERROR "NETCDF_ENABLE_NETCDF4/NETCDF_ENABLE_NETCDF_4 are obsolete. Please use NETCDF_ENABLE_HDF5 instead.")
endif()

Expand Down Expand Up @@ -1476,6 +1476,9 @@ if(NETCDF_ENABLE_TESTS)
if(NETCDF_ENABLE_NCZARR)
include_directories(nczarr_test)
add_subdirectory(nczarr_test)
if(NETCDF_ENABLE_S3)
add_subdirectory(v3_nczarr_test)
endif()
endif()
endif()

Expand Down
13 changes: 13 additions & 0 deletions cmake/netcdf_functions_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,16 @@ function(is_disabled feature ret_val)
set("NC_${ret_val}" 1 PARENT_SCOPE)
endif(${feature})
endfunction()


##################################################
# Wrap existing macros to prepend v3_ in order to avoid
# "...another target with the same name already exists" errors.

macro(v3_build_bin_test_with_util_lib F UTIL_LIB)
build_bin_test_with_util_lib("v3_${F}" "v3_${UTIL_LIB}")
endmacro()

macro(v3_add_bin_test_with_util_lib PREFIX F UTIL_LIB)
add_bin_test_with_util_lib(${PREFIX} "v3_${F}" "v3_${UTIL_LIB}")
endmacro()
3 changes: 0 additions & 3 deletions nczarr_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ IF(NETCDF_ENABLE_TESTS)
build_bin_test_with_util_lib(zmapio ut_util)
if(USE_HDF5)
build_bin_test_with_util_lib(ncdumpchunks ut_util)
target_include_directories(ncdumpchunks PUBLIC ../libnczarr)
target_include_directories(ncdumpchunks PUBLIC HDF5::HDF5)
target_link_libraries(ncdumpchunks netcdf HDF5::HDF5 hdf5::hdf5_hl)
endif()

IF(NETCDF_ENABLE_S3 AND NOT WITH_S3_TESTING STREQUAL "NO")
Expand Down
2 changes: 1 addition & 1 deletion nczarr_test/ncdumpchunks.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "ncpathmgr.h"
#include "nclog.h"

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#include <H5DSpublic.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion nczarr_test/test_filter_vlen.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <string.h>
#include <stdlib.h>

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#endif
#include "netcdf.h"
Expand Down
103 changes: 42 additions & 61 deletions v3_nczarr_test/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v3_nczarr_test/test_chunkcases.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ncpathmgr.h"
#include "nclist.h"

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#include <H5DSpublic.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion v3_nczarr_test/test_unlim_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ncpathmgr.h"
#include "nclist.h"

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#include <H5DSpublic.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion v3_nczarr_test/test_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "XGetopt.h"
#endif

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#include <H5DSpublic.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion v3_nczarr_test/testfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ netcdf bzip2 {
#include <string.h>
#include <stdlib.h>

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion v3_nczarr_test/testfilter_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string.h>
#include <stdlib.h>

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion v3_nczarr_test/testfilter_multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Test support for multiple filters per variable
#include <string.h>
#include <stdlib.h>

#ifdef HAVE_HDF5_H
#ifdef USE_HDF5
#include <hdf5.h>
#endif

Expand Down

0 comments on commit 2a8b6a7

Please sign in to comment.