mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh)
1. Cleanup test_common.sh to expunge (mostly) the use of the VS path value. This has the effect of being unable to use the Visual Studio C compiler for shell tests. 2. There is a missing case in CMakeLists.txt so add defaulting for HDF5_C_LIBRARY_hdf5 using HDF5_C_LIBRARY. Ward should probably examine this to get it fixed correctly. 3. Put back ref to esg.md in docs/Doxyfile.in 4. Fix minor warning in dut8proc.h
This commit is contained in:
parent
7fb4edd6d9
commit
6a4ba35565
@ -644,6 +644,11 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
|
||||
SET(HDF5_C_LIBRARY hdf5)
|
||||
ENDIF()
|
||||
ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
|
||||
|
||||
# There is a missing case in the above code so default it
|
||||
IF("${HDF5_C_LIBRARY_hdf5}" STREQUAL "" )
|
||||
SET(HDF5_C_LIBRARY_hdf5 "${HDF5_C_LIBRARY}")
|
||||
ENDIF()
|
||||
|
||||
###
|
||||
# The following options are not used in Windows.
|
||||
|
3
cf
3
cf
@ -54,7 +54,8 @@ MALLOC_CHECK=""
|
||||
CPPFLAGS=""
|
||||
LDFLAGS=""
|
||||
|
||||
CFLAGS="-g -O0 $CFLAGS"
|
||||
#CFLAGS="-g -O0 $CFLAGS"
|
||||
CFLAGS="-g $CFLAGS"
|
||||
|
||||
MAKE=make
|
||||
IGNORE="test 0 = 1"
|
||||
|
32
cf.cmake
32
cf.cmake
@ -2,16 +2,8 @@
|
||||
NC4=1
|
||||
DAP=1
|
||||
|
||||
# Is visual studio being used?
|
||||
VS=yes
|
||||
#CYGWIN=yes
|
||||
|
||||
if test "x$VS" = x ; then
|
||||
#CC=mpicc
|
||||
CC=gcc
|
||||
fi
|
||||
|
||||
export CC
|
||||
#export CC=mpicc
|
||||
export CC=gcc
|
||||
|
||||
FLAGS="-DCMAKE_PREFIX_PATH=c:/tools/nccmake"
|
||||
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=d:/ignore"
|
||||
@ -29,17 +21,21 @@ FLAGS="$FLAGS -DENABLE_DAP_REMOTE_TESTS=true"
|
||||
FLAGS="$FLAGS -DENABLE_TESTS=true"
|
||||
FLAGS="$FLAGS -DENABLE_EXAMPLES=false"
|
||||
#FLAGS="$FLAGS -DENABLE_HDF4=true"
|
||||
FLAGS="$FLAGS -DENABLE_DYNAMIC_LOADING=false"
|
||||
|
||||
rm -fr build
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake $FLAGS ..
|
||||
# We must use Release config here because Debug will invoke a runtime dialog box.
|
||||
NCLIB=`pwd`
|
||||
NCLIB="${NCLIB}/build/liblib"
|
||||
|
||||
# If missing, appears to default to Debug
|
||||
VSCFG=RelWithDebInfo
|
||||
CFG="--config $VSCFG"
|
||||
export PATH="/cygdrive/d/git/dap4/build/liblib/${VSCFG}:$PATH"
|
||||
cmake --build . ${CFG}
|
||||
cmake --build . ${CFG} --target RUN_TESTS
|
||||
G="-GUnix Makefiles"
|
||||
cmake "${G}" $FLAGS ..
|
||||
#cmake "${G}" --build .
|
||||
|
||||
#cmake "${G}" --build . --target test
|
||||
make all
|
||||
export PATH="${NCLIB}:${PATH}"
|
||||
make test
|
||||
exit
|
||||
|
@ -759,6 +759,7 @@ INPUT = \
|
||||
@abs_top_srcdir@/docs/file_format_specifications.md \
|
||||
@abs_top_srcdir@/docs/tutorial.dox \
|
||||
@abs_top_srcdir@/docs/notes.md \
|
||||
@abs_top_srcdir@/docs/esg.md \
|
||||
@abs_top_srcdir@/docs/all-error-codes.md \
|
||||
@abs_top_srcdir@/docs/FAQ.md \
|
||||
@abs_top_srcdir@/docs/known_problems.md \
|
||||
|
@ -30,7 +30,6 @@ See the following pages for more information.
|
||||
|
||||
- \subpage dap_accessing_data
|
||||
- <a href="auth.html">netCDF Authorization Support</a>
|
||||
- \subpage esg
|
||||
- \subpage dap_to_netcdf
|
||||
- \subpage dap2_reserved_keywords
|
||||
- \subpage var_dim_trans
|
||||
|
@ -120,6 +120,7 @@ typedef bool nc_utf8proc_bool;
|
||||
#endif
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef UTF8PROC_EXPORTS
|
||||
#ifdef _WIN32
|
||||
# ifdef UTF8PROC_EXPORTS
|
||||
# define UTF8PROC_DLLEXPORT __declspec(dllexport)
|
||||
@ -131,6 +132,7 @@ typedef bool nc_utf8proc_bool;
|
||||
#else
|
||||
# define UTF8PROC_DLLEXPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -2,9 +2,6 @@
|
||||
# This shell script runs the ncgen tests.
|
||||
# $Id: run_tests.sh,v 1.10 2010/04/04 22:06:03 dmh Exp $
|
||||
|
||||
export SETX=1
|
||||
set -x
|
||||
|
||||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
||||
. ../test_common.sh
|
||||
|
||||
|
@ -16,20 +16,22 @@ TOPBUILDDIR=@TOPBUILDDIR@
|
||||
# 2. Autoconf with make distcheck: the src and build trees are distinct
|
||||
# 3. Cmake on a *nix platform using e.g. gcc:
|
||||
# the src and build trees are distinct.
|
||||
# 4. Cmake using Visual Studio (VS) compiler: obviously this implies Windows.
|
||||
# This only works if a number of *nix tools are available via Cygwin
|
||||
# or MinGW. The src and build trees are distinct.
|
||||
#
|
||||
# The big difference between #3 and #4 is the handling of executables
|
||||
# and the notion of a VS configuration type like Debug or Release.
|
||||
# When using VS, executables are placed in a subdirectory of the build
|
||||
# directory. That subdirectory is named by the configuration type.
|
||||
# 4. Cmake on windows using cygwin or msys.
|
||||
# The src and build trees are distinct.
|
||||
#
|
||||
# For now, an explicit build using the Visual C(++) compiler
|
||||
# is not supported. The big issue is the handling of executables
|
||||
# and the notion of a VS configuration/build type like Debug or Release.
|
||||
# When using VS, executables are placed in a subdirectory of the
|
||||
# build directory. That subdirectory is named by the configuration type.
|
||||
# Thus one finds ncdump.exe in $top_builddir/ncdump/Debug instead of
|
||||
# $top_builddir/ncdump.
|
||||
#
|
||||
# An additional issue is the extension of an executable: .exe vs nothing.
|
||||
# This code attempts to figure out which is used.
|
||||
|
||||
# $top_builddir/ncdump. An additional issue is the extension of an
|
||||
# executable: .exe vs nothing. This code attempts to figure out which is used.
|
||||
#
|
||||
# For possible future fixes, a placeholder is left in place in the
|
||||
# following code named VS. If it were set to the build type, then,
|
||||
# in theory, this code would work with Visual C. It is disabled for now.
|
||||
#
|
||||
# The goal, then, of this common code is to set up some useful
|
||||
#constants for use in test shell scripts.
|
||||
# 1. srcdir - absolute path to the source dir (e.g. ${top_srcdir}/ncgen)
|
||||
@ -47,7 +49,7 @@ TOPBUILDDIR=@TOPBUILDDIR@
|
||||
# 8. NCGEN - absolute path to ncgen.exe
|
||||
# 9. NCGEN3 - absolute path to ncgen3.exe
|
||||
|
||||
# Allow global set -x mechanism
|
||||
# Allow global set -x mechanism for debugging.
|
||||
if test "x$SETX" = x1 ; then set -x ; fi
|
||||
|
||||
# We assume that TOPSRCDIR and TOPBUILDDIR are defined
|
||||
@ -55,6 +57,9 @@ if test "x$SETX" = x1 ; then set -x ; fi
|
||||
top_srcdir="$TOPSRCDIR"
|
||||
top_builddir="$TOPBUILDDIR"
|
||||
|
||||
# Currently not used, but left as a Visual Studio placeholder.
|
||||
# VS=Debug
|
||||
|
||||
# srcdir may or may not be defined, but if not, then create it
|
||||
if test "x$srcdir" = x ; then
|
||||
# we need to figure out our directory
|
||||
@ -67,20 +72,8 @@ fi
|
||||
# We also assume we are executing in builddir
|
||||
builddir=`pwd`
|
||||
|
||||
# Test for cmake related items
|
||||
if test "x$CMAKE_CONFIG_TYPE" != x -o "x$USECMAKE" != x ; then
|
||||
ISCMAKE=1;
|
||||
fi
|
||||
|
||||
# Compute execdir as well as a suffix to use for accessing
|
||||
# executables. Note that the leading '/' is needed to avoid
|
||||
# occurrences of ...//... in a path
|
||||
#if test "x$CMAKE_CONFIG_TYPE" != x ; then
|
||||
# Assume case #4: visual studio
|
||||
# VS="/${CMAKE_CONFIG_TYPE}"
|
||||
#else
|
||||
VS=
|
||||
#fi
|
||||
# execdir is an alias for builddir except
|
||||
# in the currently unsupported case of using Visual Studio
|
||||
execdir="${builddir}$VS"
|
||||
|
||||
# pick off the last component as the relative name of this directory
|
||||
@ -94,24 +87,26 @@ cd $builddir; builddir=`pwd` ; cd $WD
|
||||
cd $top_builddir; top_builddir=`pwd` ; cd $WD
|
||||
cd $execdir; execdir=`pwd` ; cd $WD
|
||||
|
||||
# If we have cygpath, then try to normalize
|
||||
tcc=`uname | cut -d '_' -f 1`
|
||||
if test "x$tcc_os" = xCYGWIN ; then
|
||||
ISCYGWIN=1
|
||||
fi
|
||||
# If we have cygpath (which only exists under CYGWIN),
|
||||
# then try to normalize selected file paths.
|
||||
|
||||
if test "x$ISCYGWIN" = x1; then
|
||||
srcdir=`cygpath -mla $srcdir`
|
||||
top_srcdir=`cygpath -mla $top_srcdir`
|
||||
builddir=`cygpath -mla $builddir`
|
||||
top_builddir=`cygpath -mla $top_builddir`
|
||||
execdir=`cygpath -mla $execdir`
|
||||
fi
|
||||
# So are we operating under CYGWIN? (test using uname)
|
||||
tcc=`uname | cut -d '_' -f 1`
|
||||
if test "x$tcc_os" = xCYGWIN ; then ISCYGWIN=1; fi
|
||||
|
||||
# Normalize selected paths
|
||||
#if test "x$ISCYGWIN" = x1; then
|
||||
#srcdir=`cygpath -mla $srcdir`
|
||||
#top_srcdir=`cygpath -mla $top_srcdir`
|
||||
#builddir=`cygpath -mla $builddir`
|
||||
#top_builddir=`cygpath -mla $top_builddir`
|
||||
#execdir=`cygpath -mla $execdir`
|
||||
#fi
|
||||
|
||||
# For sun os
|
||||
export srcdir top_srcdir builddir top_builddir execdir
|
||||
|
||||
# Figure out executable extension
|
||||
# Figure out executable extension (probably a better way)
|
||||
if test -e "${top_builddir}/ncdump${VS}/ncdump.exe" ; then
|
||||
ext=".exe"
|
||||
else
|
||||
@ -119,32 +114,17 @@ else
|
||||
fi
|
||||
|
||||
# We need to locate certain executables (and other things)
|
||||
# Find the relevant directory
|
||||
# and capture absolute paths
|
||||
NCDUMP="${top_builddir}/ncdump${VS}/ncdump${ext}"
|
||||
NCCOPY="${top_builddir}/ncdump${VS}/nccopy${ext}"
|
||||
NCGEN="${top_builddir}/ncgen${VS}/ncgen${ext}"
|
||||
NCGEN3="${top_builddir}/ncgen3${VS}/ncgen3${ext}"
|
||||
|
||||
# Need to put netcdf.dll into the path if using cmake
|
||||
if test "x$ISCMAKE" = x1 ; then
|
||||
NCLIBDIR="${top_builddir}/liblib${VS}"
|
||||
if test "x$ISCYGWIN" = x1; then
|
||||
NCLIBDIR=`cygpath -ua $NCLIBDIR`
|
||||
fi
|
||||
export PATH="${NCLIBDIR}:${PATH}"
|
||||
fi
|
||||
|
||||
# Temporary hacks (until we have a test_utils directory
|
||||
# Temporary hacks (until we have a test_utils directory)
|
||||
# to locate certain specific test files
|
||||
ncgen3c0="${top_srcdir}/ncgen3/c0.cdl"
|
||||
ncgenc0="${top_srcdir}/ncgen/c0.cdl"
|
||||
ncgenc04="${top_srcdir}/ncgen/c0_4.cdl"
|
||||
|
||||
# Hack to see is valgrind is available
|
||||
# Use subshell to keep quiet
|
||||
#(set +x ; if valgrind --version ; then exit 1 ; else exit 0 ; fi) >& /dev/null
|
||||
#if test "x$?" = x1 ; then
|
||||
#VALGRIND="valgrind --leak-check=full"
|
||||
#fi
|
||||
|
||||
# Make sure we are in builddir (not execdir)
|
||||
cd $builddir
|
||||
|
Loading…
Reference in New Issue
Block a user