mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Fixed an issue with Windows builds
not compiling due to how ssize_t was being detected/defined.
This commit is contained in:
parent
1df00fa579
commit
da16fc1cde
@ -81,7 +81,7 @@ FIND_PACKAGE(PkgConfig QUIET)
|
|||||||
## File taken from http://ensc.de/cmake/FindMakeDist.cmake
|
## File taken from http://ensc.de/cmake/FindMakeDist.cmake
|
||||||
FIND_PACKAGE(MakeDist)
|
FIND_PACKAGE(MakeDist)
|
||||||
ADD_MAKEDIST()
|
ADD_MAKEDIST()
|
||||||
ENABLE_MAKEDIST(cmake_config.h.in CMakeLists.txt cmake)
|
|
||||||
|
|
||||||
## End 'enable dist and distcheck'
|
## End 'enable dist and distcheck'
|
||||||
# Only necessary for Windows
|
# Only necessary for Windows
|
||||||
@ -97,6 +97,16 @@ ENDIF()
|
|||||||
#####
|
#####
|
||||||
# Some utility macros/scripts.
|
# Some utility macros/scripts.
|
||||||
#####
|
#####
|
||||||
|
# Macro to append files to the EXTRA_DIST files.
|
||||||
|
#####
|
||||||
|
SET(EXTRA_DIST "")
|
||||||
|
MACRO(ADD_EXTRA_DIST files)
|
||||||
|
FOREACH(F ${files})
|
||||||
|
SET(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_CURRENT_SOURCE_DIR}/${F})
|
||||||
|
SET(EXTRA_DIST ${EXTRA_DIST} PARENT_SCOPE)
|
||||||
|
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
# A basic script used to convert m4 files
|
# A basic script used to convert m4 files
|
||||||
MACRO(GEN_m4 filename)
|
MACRO(GEN_m4 filename)
|
||||||
@ -206,6 +216,7 @@ MACRO(print_conf_summary)
|
|||||||
MESSAGE(STATUS "\tUsing pnetcdf:\t\t\t" ${STATUS_PNETCDF})
|
MESSAGE(STATUS "\tUsing pnetcdf:\t\t\t" ${STATUS_PNETCDF})
|
||||||
MESSAGE(STATUS "\tUsing Parallel IO:\t\t" ${STATUS_PARALLEL})
|
MESSAGE(STATUS "\tUsing Parallel IO:\t\t" ${STATUS_PARALLEL})
|
||||||
MESSAGE(STATUS "\tLinking against:\t\t" "${ALL_TLL_LIBS}")
|
MESSAGE(STATUS "\tLinking against:\t\t" "${ALL_TLL_LIBS}")
|
||||||
|
|
||||||
MESSAGE("")
|
MESSAGE("")
|
||||||
|
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
@ -649,7 +660,14 @@ CHECK_TYPE_SIZE("uchar" SIZEOF_UCHAR)
|
|||||||
CHECK_TYPE_SIZE("int64_t" SIZEOF_INT64_T)
|
CHECK_TYPE_SIZE("int64_t" SIZEOF_INT64_T)
|
||||||
CHECK_TYPE_SIZE("uint64_t" SIZEOF_UINT64_T)
|
CHECK_TYPE_SIZE("uint64_t" SIZEOF_UINT64_T)
|
||||||
|
|
||||||
SET(HAVE_SSIZE_T SIZEOF_SSIZE_T CACHE STRING "")
|
IF(SIZEOF_SSIZE_T)
|
||||||
|
SET(HAVE_SSIZE_T 1)
|
||||||
|
ELSE()
|
||||||
|
CHECK_TYPE_SIZE("SSIZE_T" SIZEOF_SSIZE_T)
|
||||||
|
IF(SIZEOF_SSIZE_T)
|
||||||
|
SET(HAVE_SSIZE_T 1)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Check for various functions.
|
# Check for various functions.
|
||||||
CHECK_FUNCTION_EXISTS(fsync HAVE_FSYNC)
|
CHECK_FUNCTION_EXISTS(fsync HAVE_FSYNC)
|
||||||
@ -916,7 +934,10 @@ set (CPACK_COMPONENT_DEPENDENCIES_DESCRIPTION
|
|||||||
set (CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
|
set (CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
|
||||||
"The netCDF user documentation.")
|
"The netCDF user documentation.")
|
||||||
print_conf_summary()
|
print_conf_summary()
|
||||||
#MESSAGE(STATUS "CPACK_SOURCE_IGNORE_FILES: ${CPACK_SOURCE_IGNORE_FILES}")
|
|
||||||
|
# Enable Makedist files.
|
||||||
|
ENABLE_MAKEDIST(README COPYRIGHT RELEASE_NOTES INSTALL INSTALL.cmake test_prog.c lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt config.h.in.cmake cmake_uninstall.cmake.in netcdf-config-version.cmake.in netcdf-config.cmake.in FixBundle.cmake.in nc-config.in.cmake RELEASE_NOTES.md configure)
|
||||||
|
|
||||||
# CPack inclusion must come last.
|
# CPack inclusion must come last.
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
||||||
|
@ -268,6 +268,5 @@
|
|||||||
#cmakedefine DLL_EXPORT
|
#cmakedefine DLL_EXPORT
|
||||||
#cmakedefine DLL_NETCDF
|
#cmakedefine DLL_NETCDF
|
||||||
|
|
||||||
|
|
||||||
#include <ncconfigure.h>
|
#include <ncconfigure.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -51,3 +51,4 @@ IF (BUILD_PARALLEL)
|
|||||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||||
ENDIF(BUILD_PARALLEL)
|
ENDIF(BUILD_PARALLEL)
|
||||||
|
|
||||||
|
ADD_EXTRA_DIST("${libsrc_SOURCES}" attr.m4 ncx.m4 putget.m4 XGetopt.c)
|
@ -2,7 +2,6 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||||||
|
|
||||||
INCLUDE_DIRECTORIES(".")
|
INCLUDE_DIRECTORIES(".")
|
||||||
|
|
||||||
#SET(oc_SOURCES occurlfunctions.c dapparse.c daplex.c ocdata.c ocuri.c ochttp.c ocbytes.c oc.c ocdebug.c ocdump.c ocinternal.c occompile.c oclist.c oclog.c ocnode.c ocutil.c occlientparams.c ocrc.c ocread.c xxdr.c daptab.c)
|
|
||||||
SET(oc_SOURCES oc.c daplex.c dapparse.c daptab.c occlientparams.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocrc.c ocread.c ocutil.c ocbytes.c oclist.c ocuri.c oclog.c xxdr.c)
|
SET(oc_SOURCES oc.c daplex.c dapparse.c daptab.c occlientparams.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocrc.c ocread.c ocutil.c ocbytes.c oclist.c ocuri.c oclog.c xxdr.c)
|
||||||
|
|
||||||
add_library(oc2 OBJECT ${oc_SOURCES})
|
add_library(oc2 OBJECT ${oc_SOURCES})
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#else
|
#else
|
||||||
#define ssize_t int
|
#define ssize_t int
|
||||||
#endif
|
#endif
|
||||||
|
#define HAVE_SSIZE_T
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ocinternal.h"
|
#include "ocinternal.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user