mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
BLD: Get netCDF4 build working on Windows.
Most changes are to get plugins working. libdispatchdreg.c went in in unidata/netcdf-c#2460, after I'd done it here. Summary of individual changes below. BLD: Remove declspec(dllexport); in dreg.c. By removing the explicit handling, the automatic handling (equivalent to --export-all-symbols with recent GNU tools) will be enabled again, so the generated library will have more than one function exported. BLD: Link plugins against libnetcdf on Cygwin. BLD: Add AM_LDFLAGS to plugin _LDFLAGS to pass -no-undefined. BLD: Link ncz*filters plugins against libnetcdf. BLD: Add AM_LDFLAGS to test plugin _LDFLAGS. Also move rpath from AM_LDFLAGS to test plugin _LDFLAGS. TST: Don't run nczarr_test/run_specific_filters.sh on Cygwin. It takes over half an hour to complete, where the others take a minute or less. TST: Try to find the hanging Cygwin test.
This commit is contained in:
parent
086eed0e39
commit
0eed60a295
@ -19,7 +19,6 @@
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
|
||||
int
|
||||
getmountpoint(char* keyvalue, size_t size)
|
||||
{
|
||||
|
@ -116,8 +116,10 @@ zs3parse_SOURCES = zs3parse.c
|
||||
if ENABLE_NCZARR_S3
|
||||
noinst_PROGRAMS += s3util
|
||||
s3util_SOURCES = s3util.c
|
||||
if !ISCYGWIN
|
||||
TESTS += run_s3_cleanup.sh
|
||||
endif
|
||||
endif
|
||||
|
||||
# Given a netcdf4|NCZarr file, dump the actual chunk contents.
|
||||
# Used to validate nczarr chunking code.
|
||||
|
@ -5,7 +5,7 @@
|
||||
include $(top_srcdir)/lib_flags.am
|
||||
|
||||
AM_LDFLAGS += -module -avoid-version -shared -export-dynamic \
|
||||
-rpath ${abs_builddir} ${NOUNDEFINED}
|
||||
$(NOUNDEFINED)
|
||||
|
||||
# Create an alternate directory if not installing or for noinst installs.
|
||||
ALTPLUGINDIR = ${abs_top_builddir}/plugins/plugindir
|
||||
@ -33,6 +33,10 @@ plugin_version_info = -version-info 0:0:0
|
||||
if ISMINGW
|
||||
LDADD = ${top_builddir}/liblib/libnetcdf.la
|
||||
endif
|
||||
if ISCYGWIN
|
||||
LDADD = $(top_builddir)/liblib/libnetcdf.la
|
||||
LIBADD = $(top_builddir)/liblib/libnetcdf.la
|
||||
endif
|
||||
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
@ -55,15 +59,15 @@ lib__nch5shuffle_la_SOURCES = H5Zshuffle.c
|
||||
lib__nch5fletcher32_la_SOURCES = H5Zfletcher32.c H5checksum.c
|
||||
lib__nch5deflate_la_SOURCES = H5Zdeflate.c
|
||||
|
||||
lib__nch5shuffle_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5deflate_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5fletcher32_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5shuffle_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS)
|
||||
lib__nch5deflate_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS)
|
||||
lib__nch5fletcher32_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS)
|
||||
|
||||
# Need our version of szip if libsz available and we are not using HDF5
|
||||
if HAVE_SZ
|
||||
plugin_LTLIBRARIES += lib__nch5szip.la
|
||||
lib__nch5szip_la_SOURCES = H5Zszip.c H5Zszip.h
|
||||
lib__nch5szip_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5szip_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS)
|
||||
endif
|
||||
|
||||
endif # ENABLE_NCZARR_FILTERS
|
||||
@ -72,7 +76,10 @@ if ENABLE_PLUGINS
|
||||
|
||||
# The NCZarr codec libraries
|
||||
lib__nczstdfilters_la_SOURCES = NCZstdfilters.c
|
||||
lib__nczstdfilters_la_LIBADD = $(LIBADD)
|
||||
lib__nczhdf5filters_la_SOURCES = NCZhdf5filters.c
|
||||
lib__nczhdf5filters_la_LIBADD = $(LIBADD)
|
||||
|
||||
|
||||
lib__nczstdfilters_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nczhdf5filters_la_LDFLAGS= ${plugin_version_info}
|
||||
@ -82,13 +89,13 @@ plugin_LTLIBRARIES += lib__nczstdfilters.la
|
||||
|
||||
if HAVE_BLOSC
|
||||
lib__nch5blosc_la_SOURCES = H5Zblosc.c H5Zblosc.h
|
||||
lib__nch5blosc_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5blosc_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS)
|
||||
plugin_LTLIBRARIES += lib__nch5blosc.la
|
||||
endif
|
||||
|
||||
if HAVE_ZSTD
|
||||
lib__nch5zstd_la_SOURCES = H5Zzstd.c H5Zzstd.h
|
||||
lib__nch5zstd_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5zstd_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS)
|
||||
plugin_LTLIBRARIES += lib__nch5zstd.la
|
||||
endif
|
||||
|
||||
@ -98,18 +105,18 @@ endif #ENABLE_PLUGINS
|
||||
# Need two distinct instances
|
||||
lib__nch5noop_la_SOURCES = H5Znoop.c H5Zutil.c h5noop.h
|
||||
lib__nch5noop1_la_SOURCES = H5Znoop1.c H5Zutil.c h5noop.h
|
||||
lib__nch5noop_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5noop1_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5noop_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS) -rpath $(abs_builddir)/.libs
|
||||
lib__nch5noop1_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS) -rpath $(abs_builddir)/.libs
|
||||
|
||||
# The misc filter is to allow testing of filter arguments
|
||||
lib__nch5misc_la_SOURCES = H5Zmisc.c H5Zutil.c h5misc.h
|
||||
lib__nch5misc_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5misc_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS) -rpath $(abs_builddir)/.libs
|
||||
lib__nczmisc_la_SOURCES = NCZmisc.c
|
||||
lib__nczmisc_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nczmisc_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS) -rpath $(abs_builddir)/.libs
|
||||
|
||||
# Provide a filter to test missing filter
|
||||
lib__nch5unknown_la_SOURCES = H5Zunknown.c
|
||||
lib__nch5unknown_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5unknown_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS) -rpath $(abs_builddir)/.libs
|
||||
|
||||
tmp_LTLIBRARIES += lib__nch5noop.la lib__nch5noop1.la lib__nch5misc.la lib__nczmisc.la lib__nch5unknown.la
|
||||
|
||||
@ -120,7 +127,7 @@ EXTRA_DIST += ${BZIP2SRC} BZIP2_LICENSE
|
||||
if HAVE_LOCAL_BZ2
|
||||
lib__nch5bzip2_la_SOURCES += ${BZIP2SRC}
|
||||
endif
|
||||
lib__nch5bzip2_la_LDFLAGS = ${plugin_version_info}
|
||||
lib__nch5bzip2_la_LDFLAGS = ${plugin_version_info} $(AM_LDFLAGS)
|
||||
plugin_LTLIBRARIES += lib__nch5bzip2.la
|
||||
|
||||
endif #ENABLE_FILTER_TESTING
|
||||
|
Loading…
Reference in New Issue
Block a user