Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wei-King Liao's ncvalidator program #1407

Merged
merged 6 commits into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion debug/cf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ CFLAGS="-Wall -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign ${CFL
#CFLAGS="-Wconversion"

if test "x$MEM" = x1 ; then
export NC_VLEN_NOTEST=1
CFLAGS="-fsanitize=address ${CFLAGS}"
fi

Expand Down Expand Up @@ -117,7 +118,7 @@ FLAGS="$FLAGS --enable-extreme-numbers"
#FLAGS="$FLAGS --disable-testsets"
#FLAGS="$FLAGS --disable-dap-remote-tests"
#FLAGS="$FLAGS --enable-dap-auth-tests" -- requires a new remotetest server
#FLAGS="$FLAGS --enable-doxygen --enable-internal-docs"
FLAGS="$FLAGS --enable-doxygen --enable-internal-docs"
FLAGS="$FLAGS --enable-logging"
#FLAGS="$FLAGS --disable-diskless"
FLAGS="$FLAGS --enable-mmap"
Expand Down
4 changes: 4 additions & 0 deletions debug/cf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ fi
FLAGS=

if test "x$VS" != x -a "x$INSTALL" != x ; then
<<<<<<< HEAD
FLAGS="-DCMAKE_PREFIX_PATH=${NCC}"
=======
FLAGS="$FLAGS -DCMAKE_PREFIX_PATH=${NCC}"
>>>>>>> master
fi
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=/tmp/netcdf"

Expand Down
15 changes: 14 additions & 1 deletion ncdump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@ ENDIF()
SET(ncdump_FILES ncdump.c vardata.c dumplib.c indent.c nctime0.c utils.c nciter.c)
SET(nccopy_FILES nccopy.c nciter.c chunkspec.c utils.c dimmap.c list.c)
SET(ocprint_FILES ocprint.c)
SET(ncvalidator_FILES ncvalidator.c)

IF(USE_X_GETOPT)
SET(ncdump_FILES ${ncdump_FILES} XGetopt.c)
SET(nccopy_FILES ${nccopy_FILES} XGetopt.c)
SET(ocprint_FILES ${ocprint_FILES} XGetopt.c)

SET(ncvalidator_FILES ${ncvalidator_FILES} XGetopt.c)
ENDIF()

ADD_EXECUTABLE(ncdump ${ncdump_FILES})
ADD_EXECUTABLE(nccopy ${nccopy_FILES})
ADD_EXECUTABLE(ncvalidator ${ncvalidator_FILES})

IF(ENABLE_DAP)
ADD_EXECUTABLE(ocprint ${ocprint_FILES})
ENDIF(ENABLE_DAP)

TARGET_LINK_LIBRARIES(ncdump netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(nccopy netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(ncvalidator netcdf ${ALL_TLL_LIBS})

IF(ENABLE_DAP)
TARGET_LINK_LIBRARIES(ocprint netcdf ${ALL_TLL_LIBS})
Expand All @@ -55,6 +58,13 @@ IF(MSVC)
SET_TARGET_PROPERTIES(nccopy PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
${CMAKE_CURRENT_BINARY_DIR})

SET_TARGET_PROPERTIES(ncvalidator PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR})
SET_TARGET_PROPERTIES(ncvalidator PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
${CMAKE_CURRENT_BINARY_DIR})
SET_TARGET_PROPERTIES(ncvalidator PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
${CMAKE_CURRENT_BINARY_DIR})

IF(ENABLE_DAP)
SET_TARGET_PROPERTIES(ocprint PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR})
Expand Down Expand Up @@ -265,6 +275,9 @@ IF(MSVC)
SET_TARGET_PROPERTIES(nccopy
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
)
SET_TARGET_PROPERTIES(ncvalidator
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
)

IF(ENABLE_DAP)
SET_TARGET_PROPERTIES(ocprint
Expand Down
8 changes: 8 additions & 0 deletions ncdump/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ bin_PROGRAMS += nccopy
nccopy_SOURCES = nccopy.c nciter.c nciter.h chunkspec.h chunkspec.c \
utils.h utils.c dimmap.h dimmap.c list.c list.h

# Wei-keng Liao's (wkliao@eecs.northwestern.edu)
# netcdf-3 validator program
# (https://github.com/Parallel-NetCDF/PnetCDF/blob/master/src/utils/ncvalidator/ncvalidator.c)
# that prints out the structure of a netcdf-3 file.
# This program is built but not installed.
noinst_PROGRAMS += ncvalidator
ncvalidator_SOURCES = ncvalidator.c

# A simple netcdf-4 metadata -> xml printer. Do not install.
if USE_HDF5
noinst_PROGRAMS += nc4print
Expand Down
1 change: 1 addition & 0 deletions ncdump/ncdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Research/Unidata. See \ref copyright file for more info. */
#endif

#ifdef _WIN32
#define snprintf _snprintf
#include "XGetopt.h"
int opterr;
int optind;
Expand Down
Loading