Skip to content

Commit

Permalink
Merge pull request Unidata#1841 from Unidata/dmh-osxsymbols.wif
Browse files Browse the repository at this point in the history
PR 1840 + others
  • Loading branch information
WardF authored Sep 17, 2020
2 parents ff9d1b2 + 20ca3c9 commit e9af580
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 33 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,7 @@ is_enabled(ENABLE_HDF4 HAS_HDF4)
is_enabled(USE_HDF5 HAS_HDF5)
is_enabled(USE_SZIP HAS_SZIP)
is_enabled(USE_SZIP HAS_SZIP_WRITE)
is_enabled(USE_SZIP HAS_SZLIB_WRITE)
is_enabled(STATUS_PNETCDF HAS_PNETCDF)
is_enabled(STATUS_PARALLEL HAS_PARALLEL)
is_enabled(ENABLE_PARALLEL4 HAS_PARALLEL4)
Expand Down
7 changes: 4 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1494,14 +1494,15 @@ enable_filter_testing=no
enable_clientside_filters=no
fi

AM_CONDITIONAL(ENABLE_CLIENTSIDE_FILTERS, [test x$enable_clientside_filters = xyes])
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])

if test "x$enable_shared" = xno ; then
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
enable_filter_testing=no
fi

AM_CONDITIONAL(ENABLE_CLIENTSIDE_FILTERS, [test x$enable_clientside_filters = xyes])
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])


AC_SUBST(NC_LIBS,[$NC_LIBS])
AC_SUBST(HAS_DAP,[$enable_dap])
AC_SUBST(HAS_DAP2,[$enable_dap])
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/ncbytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ncbytessetalloc(NCbytes* bb, unsigned long sz)
return TRUE;
}

void
EXTERNL void
ncbytesfree(NCbytes* bb)
{
if(bb == NULL) return;
Expand Down
14 changes: 7 additions & 7 deletions libnczarr/zdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
/* Mnemonic */
#define RAW 1

/**************************************************/
/* Data Structure */

struct ZUTEST* zutest = NULL;

/**************************************************/

#ifdef ZCATCH
/* Place breakpoint here to catch errors close to where they occur*/
int
Expand All @@ -34,13 +41,6 @@ zthrow(int err, const char* file, int line)
}
#endif

/**************************************************/
/* Data Structure */

#ifdef ZUT
struct ZUTEST zutest;
#endif

/**************************************************/
/* Data Structure printers */

Expand Down
10 changes: 3 additions & 7 deletions libnczarr/zdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#ifndef ZDEBUG_H
#define ZDEBUG_H

/* Enable unit testing; on by default */
#define ZUT

#undef ZDEBUG /* general debug */
#undef ZDEBUG1 /* detailed debug */

Expand Down Expand Up @@ -65,12 +62,11 @@ EXTERNL void NCZbacktrace(void);
#define UTEST_WALK 2
#define UTEST_TRANSFER 4

#ifdef ZUT
EXTERNL struct ZUTEST {
struct ZUTEST {
int tests;
void (*print)(int sort,...);
} zutest;
#endif
};
EXTERNL struct ZUTEST* zutest;

#endif /*ZDEBUG_H*/

12 changes: 4 additions & 8 deletions libnczarr/zwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,8 @@ fprintf(stderr,"allprojections:\n%s",nczprint_allsliceprojections(common->rank,c
slpslices[r] = proj[r]->chunkslice;
memslices[r] = proj[r]->memslice;
}
#ifdef ZUT
if(zutest.tests & UTEST_TRANSFER)
zutest.print(UTEST_TRANSFER, common, chunkodom, slpslices, memslices);
#endif
if(zutest && zutest->tests & UTEST_TRANSFER)
zutest->print(UTEST_TRANSFER, common, chunkodom, slpslices, memslices);

slpodom = nczodom_fromslices(common->rank,slpslices);
memodom = nczodom_fromslices(common->rank,memslices);
Expand Down Expand Up @@ -251,10 +249,8 @@ fflush(stderr);
#endif

LOG((1,"%s: slpptr0=%p memptr0=%p slpoffset=%llu memoffset=%lld",__func__,slpptr0,memptr0,slpoffset,memoffset));
#ifdef ZUT
if(zutest.tests & UTEST_WALK)
zutest.print(UTEST_WALK, common, chunkodom, slpodom, memodom);
#endif
if(zutest && zutest->tests & UTEST_WALK)
zutest->print(UTEST_WALK, common, chunkodom, slpodom, memodom);
if((stat = transfern(slpodom,memodom,common,slpptr0,memptr0))) goto done;
nczodom_next(memodom);
} else break; /* slpodom exhausted */
Expand Down
21 changes: 20 additions & 1 deletion ncdump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ ADD_EXECUTABLE(ncdump ${ncdump_FILES})
ADD_EXECUTABLE(nccopy ${nccopy_FILES})
ADD_EXECUTABLE(ncvalidator ${ncvalidator_FILES})

IF(USE_HDF5)
SET(nc4print_FILES nc4print.c)
ADD_EXECUTABLE(nc4print ${nc4print_FILES})
ENDIF(USE_HDF5)

IF(ENABLE_DAP)
ADD_EXECUTABLE(ocprint ${ocprint_FILES})
ENDIF(ENABLE_DAP)
Expand All @@ -33,6 +38,10 @@ TARGET_LINK_LIBRARIES(ncdump netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(nccopy netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(ncvalidator netcdf ${ALL_TLL_LIBS})

IF(USE_HDF5)
TARGET_LINK_LIBRARIES(nc4print netcdf ${ALL_TLL_LIBS})
ENDIF(USE_HDF5)

IF(ENABLE_DAP)
TARGET_LINK_LIBRARIES(ocprint netcdf ${ALL_TLL_LIBS})
ENDIF(ENABLE_DAP)
Expand Down Expand Up @@ -65,6 +74,16 @@ IF(MSVC)
SET_TARGET_PROPERTIES(ncvalidator PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
${CMAKE_CURRENT_BINARY_DIR})

IF(USE_HDF5)

SET_TARGET_PROPERTIES(ncvalidator PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR})
SET_TARGET_PROPERTIES(ncvalidator PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
${CMAKE_CURRENT_BINARY_DIR})
SET_TARGET_PROPERTIES(ncvalidator PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
${CMAKE_CURRENT_BINARY_DIR})
ENDIF(USE_HDF5)

IF(ENABLE_DAP)
SET_TARGET_PROPERTIES(ocprint PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR})
Expand Down Expand Up @@ -272,7 +291,7 @@ ENDIF(MSVC)
SET_TESTS_PROPERTIES(ncdump_run_ncgen_nc4_tests.sh ncdump_tst_nccopy4.sh ncdump_tst_ncgen_shared.sh ncdump_tst_netcdf4.sh
PROPERTIES ENVIRONMENT NC_VLEN_NOTEST=1)
ENDIF()

ENDIF()

ENDIF()
Expand Down
2 changes: 2 additions & 0 deletions ncdump/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ ncvalidator_SOURCES = ncvalidator.c

# A simple netcdf-4 metadata -> xml printer. Do not install.
if USE_HDF5
bin_PROGRAMS += nc4print
noinst_PROGRAMS += nc4print
nc4print_SOURCES = nc4print.c
endif

# Conditionally build the ocprint program, but do not install
if ENABLE_DAP
bin_PROGRAMS += ocprint
noinst_PROGRAMS += ocprint
ocprint_SOURCES = ocprint.c
endif
Expand Down
7 changes: 3 additions & 4 deletions nczarr_test/ut_chunking.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
*/

#define ZUT

#include "ut_includes.h"

void ut_chunk_print(int sort, ...);
Expand All @@ -29,8 +27,9 @@ main(int argc, char** argv)
if((stat = ut_init(argc, argv, &utoptions))) goto done;

/* Set the printer */
zutest.tests = UTEST_RANGE;
zutest.print = ut_chunk_print;
zutester.tests = UTEST_RANGE;
zutester.print = ut_chunk_print;
zutest = &zutester;

var = nclistget(utoptions.vardefs,0);

Expand Down
2 changes: 2 additions & 0 deletions nczarr_test/ut_includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@
#include "ut_test.h"
#include "ut_util.h"

static struct ZUTEST zutester;

#endif /*UT_INCLUDES_H*/
5 changes: 3 additions & 2 deletions nczarr_test/ut_projections.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ main(int argc, char** argv)
if((stat = ut_init(argc, argv, &utoptions))) goto done;

/* printer off for these tests */
zutest.tests = 0;
zutest.print = NULL;
zutester.tests = 0;
zutester.print = NULL;
zutest = &zutester;

var = nclistget(utoptions.vardefs,0);

Expand Down

0 comments on commit e9af580

Please sign in to comment.