mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Merged latest from netcdf-cmake branch.
Addressed several cmake-related issues, in terms of building on Windows. Also added XGetopt.c to EXTRA_dist in Makefile.am files.
This commit is contained in:
parent
11c2083b1c
commit
f26a4a559a
@ -19,6 +19,7 @@ ENDIF()
|
||||
|
||||
# Get system configuration
|
||||
find_program(UNAME NAMES uname)
|
||||
IF(UNAME)
|
||||
macro(getuname name flag)
|
||||
exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
|
||||
endmacro(getuname)
|
||||
@ -26,7 +27,7 @@ getuname(osname -s)
|
||||
getuname(osrel -r)
|
||||
getuname(cpu -m)
|
||||
set(BUILDNAME "${osname}-${osrel}-${cpu}" CACHE STRING "Build name variable for CDash")
|
||||
|
||||
ENDIF()
|
||||
ENABLE_TESTING()
|
||||
INCLUDE(CTest)
|
||||
|
||||
|
@ -14,6 +14,10 @@ for more info.
|
||||
#include <stddef.h> /* size_t, ptrdiff_t */
|
||||
#include <errno.h> /* netcdf functions sometimes return system errors */
|
||||
|
||||
/* Required for alloca on Windows */
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <sys/stat.h>
|
||||
|
@ -39,7 +39,7 @@ noinst_LTLIBRARIES = libnetcdf3.la
|
||||
# with m4), but they are included in the distribution so that the user
|
||||
# does not have to have m4.
|
||||
MAINTAINERCLEANFILES = attr.c ncx.c putget.c $(man_MANS) attrx.c putgetx.c
|
||||
EXTRA_DIST = attr.m4 ncx.m4 putget.m4 $(man_MANS) CMakeLists.txt
|
||||
EXTRA_DIST = attr.m4 ncx.m4 putget.m4 $(man_MANS) CMakeLists.txt XGetopt.c
|
||||
|
||||
# This tells make how to turn .m4 files into .c files.
|
||||
.m4.c:
|
||||
|
@ -23,6 +23,9 @@
|
||||
#endif
|
||||
#include "nc3dispatch.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#undef MIN /* system may define MIN somewhere and complain */
|
||||
#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))
|
||||
|
@ -123,7 +123,7 @@ ref_nc_test_netcdf4.cdl ref_tst_special_atts3.cdl tst_brecs.cdl \
|
||||
ref_tst_grp_spec0.cdl ref_tst_grp_spec.cdl tst_grp_spec.sh \
|
||||
ref_tst_charfill.cdl tst_charfill.cdl tst_charfill.sh \
|
||||
tst_iter.sh tst_mud.sh ref_tst_mud4.cdl \
|
||||
ref_tst_ncf213.cdl CMakeLists.txt
|
||||
ref_tst_ncf213.cdl CMakeLists.txt XGetopt.c
|
||||
|
||||
# NCGEN4 additions
|
||||
SUBDIRS=cdl4 expected4
|
||||
|
@ -22,7 +22,7 @@ man_MANS = ncgen.1
|
||||
# These files all need to be distributed.
|
||||
EXTRA_DIST = ncgen.y ncgenyy.c ncgen.l $(man_MANS) internals.html \
|
||||
run_tests.sh run_nc4_tests.sh c0.cdl ref_camrun.cdl \
|
||||
ncf199.cdl CMakeLists.txt
|
||||
ncf199.cdl CMakeLists.txt XGetopt.c
|
||||
|
||||
# This shell script causes ncgen to build a classic and a 64-bit
|
||||
# offset file from a cdl file shipped with the distribution.
|
||||
|
@ -30,7 +30,7 @@ endif # USE_NETCDF4
|
||||
|
||||
CLEANFILES = c0.nc c0_64.nc c0_4.nc c0_4c.nc
|
||||
|
||||
EXTRA_DIST += CMakeLists.txt
|
||||
EXTRA_DIST += CMakeLists.txt XGetopt.c
|
||||
|
||||
# This is used if someone wants to rebuild ncgenyy.c or ncgentab.c
|
||||
# Otherwise never invoked, but records how to do it. Don't forget to
|
||||
|
@ -6,6 +6,11 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef _AIX
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user