Merging from CMake branch in preparation for 4.3.0 release.

This commit is contained in:
Ward Fisher 2013-04-29 20:15:57 +00:00
parent 920393b891
commit 10807379c3
9 changed files with 39 additions and 48 deletions

View File

@ -83,7 +83,6 @@ ENABLE_MAKEDIST(cmake_config.h.in CMakeLists.txt cmake)
## End 'enable dist and distcheck'
# Only necessary for Windows
IF(MSVC)
INCLUDE (${CMAKE_SOURCE_DIR}/cmake/modules/windows/FindHDF5.cmake)
# Supress some warnings on Windows
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF()
@ -383,40 +382,18 @@ IF (USE_HDF5 OR ENABLE_NETCDF_4)
SET(USE_HDF5 ON)
SET(USE_NETCDF4 ON)
#FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
FIND_LIBRARY(HDF5_LIB NAMES hdf5 libhdf5 hdf5dll)
FIND_LIBRARY(HDF5_HL_LIB NAMES hdf5_hl libhdf5_hl hdf5_hldll)
IF(MSVC)
FIND_PACKAGE(HDF5 COMPONENTS C HL NO_MODULE REQUIRED)
ELSE()
FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
ENDIF()
IF(NOT HDF5_LIB)
MESSAGE(FATAL_ERROR "netCDF-4 support specified, but hdf5 libraries not found.")
ELSEIF(NOT HDF5_HL_LIB)
MESSAGE(FATAL_ERROR "netCDF-4 support specified, but hdf5 high-level libraries not found.")
ENDIF()
SET(HDF5_LIBRARIES ${HDF5_LIB} ${HDF5_HL_LIB})
FIND_PATH(HDF5_INCLUDE_DIR H5public.h)
IF(NOT HDF5_INCLUDE_DIR)
MESSAGE(FATAL_ERROR "netCDF-4 support specified, but hdf5 include directories not found.")
ENDIF()
MESSAGE(STATUS "Found HDF5: ${HDF5_LIB}")
MESSAGE(STATUS "Found HDF5_HL: ${HDF5_HL_LIB}")
MESSAGE(STATUS "Found HDF5 Includes: ${HDF5_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
#Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip.
IF(USE_SZIP)
#FIND_PACKAGE(SZIP)
FIND_LIBRARY(SZIP_LIBRARY NAMES szip sz libszip)
IF(NOT SZIP_LIBRARY)
MESSAGE(FATAL_ERROR "HDF5 compiled with szip, but cannot find local szip libraries.")
ELSE()
MESSAGE(STATUS "Found SZip: ${SZIP_LIBRARY}")
ENDIF()
INCLUDE_DIRECTORIES(${SZIP_INCLUDE_DIRS})
FIND_PACKAGE(SZIP NO_MODULE)
INCLUDE_DIRECTORIES(${SZIP_INCLUDE_DIR})
ENDIF()
SET(H5_USE_16_API 1)

View File

@ -1,9 +1,11 @@
**************************
Building NetCDF with CMake
**************************
This document describes how to use CMake to configure and build the
NetCDF-C libraries across different platforms.
************
Introduction
************
@ -17,7 +19,7 @@ and will generate files for a variety of build systems.
- Windows: Borland Makefiles, MSYS Makefiles, MinGW Makefiles, Visual
- Studio Projects (Versions 6+) Linux: Ninja, KDevelop3 OSX: Xcode
************************************
Requirements for building with CMake
************************************
@ -26,8 +28,7 @@ a) Subversion: svn co
http://svn.unidata.ucar.edu/repos/netcdf/trunk netcdf
2. CMake 2.8.8+ for your platform of choice. http://www.cmake.org
***********
Using CMake
***********
@ -65,7 +66,7 @@ C:\netcdf\build_dir>cmake --build .
Note: If you want to use a different generator than the default, you
would specify it with the '-G' flag.
Common NetCDF Options
Common NetCDF/CMake Options
*********************
- ENABLE_NETCDF_4 (On by Default)
@ -73,7 +74,7 @@ Common NetCDF Options
- BUILD_SHARED_LIBS (Off by Default for Windows,
On by Default for Unix/Linux)
- ENABLE_DLL (Windows Only, Off by Default)
- CMAKE_PREFIX_PATH (Specify list of
This is just a partial list of options available. To see a full list
of options, run 'cmake -L' from the command line, or use a CMake GUI.

View File

@ -10,7 +10,7 @@ ACLOCAL_AMFLAGS = -I m4
# These files get added to the distribution.
EXTRA_DIST = README COPYRIGHT RELEASE_NOTES INSTALL INSTALL.cmake test_prog.c \
lib_flags.am cmake CMakeLists.txt COMPILE_CMake.txt config.h.in.cmake \
lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt config.h.in.cmake \
config.h.in.cmake cmake_uninstall.cmake.in netcdf-config-version.cmake.in \
netcdf-config.cmake.in FixBundle.cmake.in

View File

@ -6,7 +6,11 @@ https://www.unidata.ucar.edu/jira/browse/NCF-XXX .
VERSION COMMENTS
------- --------
4.3 Released 201?-??-??
4.3 Released 2013-04-29
Fixed netCDF-4 bug where odometer code for
libdap2 mishandled stride > 1. Bug reported
by Ansley Manke. [NCF-249]
Fixed netCDF-4 bug where netCDF would ignore
the HDF5 reference type in the file, instead

View File

@ -36,7 +36,6 @@
#endif
/* Cache Size, other variables for HDF5 */
#define DEFAULT_CHUNK_SIZE ${DEFAULT_CHUNK_SIZE}
#define DEFAULT_CHUNKS_IN_CACHE ${DEFAULT_CHUNKS_IN_CACHE}
@ -53,7 +52,8 @@
#endif
#define PACKAGE_VERSION "${VERSION}"
#define VERSION "${VERSION}"
#cmakedefine VERSION "${VERSION}"
#cmakedefine NC_VERSION "${VERSION}"
/* For HDF5 use. */
#cmakedefine H5_USE_16_API 1

View File

@ -22,12 +22,14 @@ defined.
extern char* strdup(const char*);
#endif
#if HAVE_BASETSD_H
#ifndef SSIZE_T
#include <BaseTsd.h>
#define ssize_t SSIZE_T
#endif
#endif
//#if HAVE_BASETSD_H
//#ifndef ssize_t
//#ifndef SSIZE_T
//#include <BaseTsd.h>
//#endif
//#define ssize_t SSIZE_T
//#endif
//#endif

View File

@ -17,6 +17,13 @@ Version: 2.0
/*!\file oc.h
*/
#ifndef ssize_t
#ifdef SSIZE_T
#define ssize_t SSIZE_T
#else
#define ssize_t int
#endif
#endif
/*!\defgroup Definitions Constants, types, etc.
@{*/

View File

@ -584,7 +584,7 @@ ocsetcurlproperties(OCstate* state)
if(state->curlflags.useragent == NULL) {
size_t len = strlen(DFALTUSERAGENT) + strlen(VERSION) + 1;
char* agent = (char*)malloc(len+1);
if(occopycat(agent,len,2,DFALTUSERAGENT,VERSION))
if(occopycat(agent,len,2,DFALTUSERAGENT,VERSION))
state->curlflags.useragent = agent;
}
return;

View File

@ -220,7 +220,7 @@ xxdr_free(XXDR* xdr)
int
xxdr_skip(XXDR* xdrs, off_t len)
{
ssize_t pos;
unsigned int pos;
pos = xxdr_getpos(xdrs);
pos = (pos + len);
if(pos < 0) pos = 0;