This commit is contained in:
dmh 2015-08-19 17:46:50 -06:00
commit 765dd83592
15 changed files with 212 additions and 182 deletions

View File

@ -873,12 +873,21 @@ IF(ENABLE_DOXYGEN)
SET(BUILD_INTERNAL_DOCS NO CACHE STRING "")
ENDIF()
OPTION(DOXYGEN_ENABLE_SERVER_SIDE_SEARCH "Enable doxygen server-side search. This is of interest to developers only." OFF)
IF(DOXYGEN_ENABLE_SERVER_SIDE_SEARCH)
SET(SERVER_SIDE_SEARCH YES CACHE STRING "")
###
#
# If we are building release documentation, we need to set some
# variables that will be used in the Doxygen.in template.
###
OPTION(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS "Build release documentation. This is of interest only to the netCDF developers." OFF)
IF(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS)
SET(DOXYGEN_CSS_FILE "${CMAKE_SOURCE_DIR}/docs/release.css" CACHE STRING "")
SET(DOXYGEN_HEADER_FILE "${CMAKE_SOURCE_DIR}/docs/release_header.html" CACHE STRING "")
SET(DOXYGEN_SEARCHENGINE "NO" CACHE STRING "")
ELSE()
SET(SERVER_SIDE_SEARCH NO CACHE STRING "")
ENDIF()
SET(DOXYGEN_CSS_FILE "" CACHE STRING "")
SET(DOXYGEN_HEADER_FILE "" CACHE STRING "")
SET(DOXYGEN_SEARCHENGINE "YES" CACHE STRING "")
ENDIF(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS)
# Option to turn on the TODO list in the doxygen-generated documentation.
OPTION(DOXYGEN_ENABLE_TASKS "Turn on test, todo, bug lists in documentation. This is of interest to developers only." OFF)
IF(DOXYGEN_ENABLE_TASKS)
@ -920,7 +929,7 @@ ENDIF()
# Set some of the options as advanced.
MARK_AS_ADVANCED(ENABLE_INTERNAL_DOCS VALGRIND_TESTS ENABLE_PNETCDF ENABLE_COVERAGE_TESTS)
MARK_AS_ADVANCED(ENABLE_DAP_REMOTE_TESTS ENABLE_DAP_LONG_TESTS USE_REMOTE_CDASH)
MARK_AS_ADVANCED(DOXYGEN_ENABLE_SERVER_SIDE_SEARCH DOXYGEN_ENABLE_TASKS)
MARK_AS_ADVANCED(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS DOXYGEN_ENABLE_TASKS)
################################
# Option checks
################################

View File

@ -1096,7 +1096,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
HTML_HEADER = docs/extra_header.html
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
@ -1129,7 +1129,7 @@ HTML_STYLESHEET =
# see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET = docs/extra.css
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@ -1527,7 +1527,7 @@ MATHJAX_CODEFILE =
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
SEARCHENGINE = YES
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using Javascript. There

View File

@ -95,12 +95,25 @@ test "x$enable_doxygen_tasks" = xyes || enable_doxygen_tasks=no
AM_CONDITIONAL([SHOW_DOXYGEN_TAG_LIST], [test "x$enable_doxygen_tasks" = xyes])
AC_SUBST([SHOW_DOXYGEN_TAG_LIST], [$enable_doxygen_tasks])
AC_ARG_ENABLE([doxygen-server-side-search],
[AS_HELP_STRING([--enable-doxygen-server-side-search],
[Enable doxygen server-side search. This is of interest to developers only, or users who will serve the documentation via a web server instead of browsing locally.])])
test "x$enable_doxygen_server_side_search" = xyes || enable_doxygen_server_side_search=no
AM_CONDITIONAL([SERVER_SIDE_SEARCH], [test "x$enable_doxygen_server_side_search" = xyes])
AC_SUBST([SERVER_SIDE_SEARCH], [$enable_doxygen_server_side_search])
###
# Determine if we should build documentation
# configured for releases on the Unidata web server.
###
AC_ARG_ENABLE([doxygen-build-release-docs],
[AS_HELP_STRING([--enable-doxygen-build-release-docs],
[Build release documentation. This is of interest only to developers.])])
test "x$enable_doxygen_build_release_docs" = xyes || enable_doxygen_build_release_docs=no
AM_CONDITIONAL([DOXYGEN_BUILD_RELEASE_DOCS], [test "x$enable_doxygen_build_release_docs" = xyes])
if test $enable_doxygen_build_release_docs = yes; then
AC_SUBST([DOXYGEN_CSS_FILE], ["release.css"])
AC_SUBST([DOXYGEN_HEADER_FILE], ["release_header.html"])
AC_SUBST([DOXYGEN_SEARCHENGINE], ["NO"])
else
AC_SUBST([DOXYGEN_CSS_FILE], [])
AC_SUBST([DOXYGEN_HEADER_FILE], [])
AC_SUBST([DOXYGEN_SEARCHENGINE], ["YES"])
fi
AC_ARG_ENABLE([doxygen-pdf-output],
[AS_HELP_STRING([--enable-doxygen-pdf-output],
@ -1011,7 +1024,6 @@ AM_CONDITIONAL(BUILD_DISKLESS, [test x$enable_diskless = xyes])
AM_CONDITIONAL(BUILD_MMAP, [test x$enable_mmap = xyes])
AM_CONDITIONAL(BUILD_DOCS, [test x$enable_doxygen = xyes])
AM_CONDITIONAL(SHOW_DOXYGEN_TAG_LIST, [test x$enable_doxygen_tasks = xyes])
AM_CONDITIONAL(SERVER_SIDE_SEARCH, [test x$enable_doxygen_server_side_search = xyes])
# If the machine doesn't have a long long, and we want netCDF-4, then
# we've got problems!

View File

@ -7,6 +7,8 @@ IF(ENABLE_DOXYGEN)
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.html ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_SOURCE_DIR}/*.doc ${CMAKE_CURRENT_SOURCE_DIR}/*.xml ${CMAKE_CURRENT_SOURCE_DIR}/*.m4 ${CMAKE_CURRENT_SOURCE_DIR}/*.texi)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
# Set abs_top_srcdir to work with the autotools
# doxyfile template.
SET(abs_top_srcdir ${CMAKE_SOURCE_DIR})
@ -16,7 +18,6 @@ IF(ENABLE_DOXYGEN)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
# Create auth.md by combining auth.md.in and oc2/ocauth.md
ADD_CUSTOM_TARGET(auth_doc ALL

View File

@ -1120,7 +1120,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
HTML_HEADER = @DOXYGEN_HEADER_FILE@
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
@ -1142,7 +1142,7 @@ HTML_FOOTER = @abs_top_srcdir@/docs/footer.html
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_STYLESHEET =
HTML_STYLESHEET = @DOXYGEN_CSS_FILE@
# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
# defined cascading style sheet that is included after the standard style sheets
@ -1550,7 +1550,7 @@ MATHJAX_CODEFILE =
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
SEARCHENGINE = YES
SEARCHENGINE = @DOXYGEN_SEARCHENGINE@
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using Javascript. There
@ -1562,7 +1562,7 @@ SEARCHENGINE = YES
# The default value is: NO.
# This tag requires that the tag SEARCHENGINE is set to YES.
SERVER_BASED_SEARCH = @SERVER_SIDE_SEARCH@
SERVER_BASED_SEARCH = NO
# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
# script for searching. Instead the search results are written to an XML file

29
docs/release.css Normal file
View File

@ -0,0 +1,29 @@
.tabs {
width: 100% !important;
}
.tabs ul.tablist {
width: 100% !important;
}
.tabs ul.tablist li.linkMenu select#versions {
vertical-align: middle;
height: ;
margin: 8px 0 0 10px !important;
padding: 0;
}
.tabs ul.tablist li.searchForm {
float: right;
padding: 0;
margin: 0;
}
.tabs ul.tablist li.searchForm form#cse-search-box {
float: right;
margin: 8px 10px 0 0;
}
.tabs ul.tablist li.searchForm form#cse-search-box input#search {
border-radius: 5px;
margin: 0 5px 0 0;
}

92
docs/release_header.html Normal file
View File

@ -0,0 +1,92 @@
<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://www.unidata.ucar.edu/js/jquery/jquery-latest.min.js"></script>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
<script type="text/javascript">
$( document ).ready(function() {
var $searchForm = "<form name=\"google\" action=\"http://www.unidata.ucar.edu/search.jsp\" id=\"cse-search-box\">" +
" <input type=\"hidden\" name=\"locationName\" value=\"NetCDF Documentation\"></input>" +
" <input type=\"hidden\" name=\"hq\" value=\"site:www.unidata.ucar.edu/software/netcdf/docs\"></input>" +
" <input type=\"hidden\" name=\"cx\" value=\"008424664622949020059:afj38jxaljc\"></input>" +
" <input type=\"hidden\" name=\"cof\" value=\"FORID:9\"></input>" +
" <input type=\"hidden\" name=\"ie\" value=\"UTF-8\"></input>" +
" <input type=\"text\" autocomplete=\"on\" name=\"q\" maxlength=\"255\" id=\"search\"></input>" +
" <input type=\"submit\" name=\"sa\" value=\"search\" id=\"form_submit\"></input>" +
"</form>";
var $linkMenu = "<select id=\"versions\">" +
" <option value=\"http://www.unidata.ucar.edu\">$projectnumber</option>" +
" <option value=\"http://www.unidata.ucar.edu/software/netcdf\">some other project number</option>" +
"</select>";
$("#navrow1 ul.tablist").append('<li class=\"linkMenu\"><span class="tab">' + $linkMenu + '</span></li>');
$("#navrow1 ul.tablist").append('<li class=\"searchForm\"><span class="tab">' + $searchForm + '</span></li>');
$("#versions").change(function() {
window.location.href = $(this).val();
});
});
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>
<form name="google" action="http://www.unidata.ucar.edu/search.jsp" id="cse-search-box">
<input type="hidden" name="locationName" value="NetCDF Documentation"></input>
<input type="hidden" name="hq" value="site:www.unidata.ucar.edu/software/netcdf/docs">
<input type="hidden" name="cx" value="008424664622949020059:afj38jxaljc" />
<input type="hidden" name="cof" value="FORID:9" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" autocomplete="on" name="q" maxlength="255" id="search"/>
<input type="submit" name="sa" value="search" id="form_submit" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

29
extra.css Normal file
View File

@ -0,0 +1,29 @@
.tabs {
width: 100% !important;
}
.tabs ul.tablist {
width: 100% !important;
}
.tabs ul.tablist li.linkMenu select#versions {
vertical-align: middle;
height: ;
margin: 8px 0 0 10px !important;
padding: 0;
}
.tabs ul.tablist li.searchForm {
float: right;
padding: 0;
margin: 0;
}
.tabs ul.tablist li.searchForm form#cse-search-box {
float: right;
margin: 8px 10px 0 0;
}
.tabs ul.tablist li.searchForm form#cse-search-box input#search {
border-radius: 5px;
margin: 0 5px 0 0;
}

View File

@ -145,7 +145,7 @@ extern "C" {
*/
#define NC_LOCK 0x0400
/** Share updates, limit cacheing.
/** Share updates, limit caching.
Use this in mode flags for both nc_create() and nc_open(). */
#define NC_SHARE 0x0800
@ -410,7 +410,7 @@ by the desired type. */
#define NC_EMAPTYPE (-121) /**< Mapped access for atomic types only. */
#define NC_ELATEFILL (-122) /**< Attempt to define fill value when data already exists. */
#define NC_ELATEDEF (-123) /**< Attempt to define var properties, like deflate, after enddef. */
#define NC_EDIMSCALE (-124) /**< Probem with HDF5 dimscales. */
#define NC_EDIMSCALE (-124) /**< Problem with HDF5 dimscales. */
#define NC_ENOGRP (-125) /**< No group found. */
#define NC_ESTORAGE (-126) /**< Can't specify both contiguous and chunking. */
#define NC_EBADCHUNK (-127) /**< Bad chunksize. */
@ -851,7 +851,7 @@ EXTERNL int
nc_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
float preemption);
/* Set the per-variable cache size, nelems, and preemption policy. */
/* Get the per-variable cache size, nelems, and preemption policy. */
EXTERNL int
nc_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp,
float *preemptionp);
@ -1742,10 +1742,10 @@ nc_inq_base_pe(int ncid, int *pe);
EXTERNL int
nctypelen(nc_type datatype);
/* Begin v2.4 backward compatiblity */
/* Begin v2.4 backward compatibility */
/*
* defining NO_NETCDF_2 to the preprocessor
* turns off backward compatiblity declarations.
* turns off backward compatibility declarations.
*/
#ifndef NO_NETCDF_2
@ -1910,7 +1910,7 @@ ncrecget(int ncid, long recnum, void **datap);
EXTERNL int
ncrecput(int ncid, long recnum, void *const *datap);
/* End v2.4 backward compatiblity */
/* End v2.4 backward compatibility */
#endif /*!NO_NETCDF_2*/
#if defined(__cplusplus)

View File

@ -10,7 +10,7 @@ IF(USE_HDF5 OR USE_NETCDF4)
ENDIF()
IF(USE_PNETCDF)
SET(liblib_LIBS ${liblib_LIBS} netcdf5)
SET(liblib_LIBS ${liblib_LIBS} netcdfp)
ENDIF()
IF(USE_DAP)

View File

@ -20,16 +20,6 @@ TARGET_LINK_LIBRARIES(nc_test
${HAVE_LIBM}
)
##
# The difficulties around tst_swap4b are easier solved if we
# include ncx.c directly and not try to coax the functionality
# out of libnetcdf.
##
ADD_EXECUTABLE(tst_swap4b tst_swap4b.c ${CMAKE_SOURCE_DIR}/libsrc/ncx.c ${CMAKE_SOURCE_DIR}/libsrc/ncx.h)
ADD_TEST(tst_swap4b ${EXECUTABLE_OUTPUT_PATH}/tst_swap4b)
# Some extra stand-alone tests
SET(TESTS t_nc tst_small tst_misc tst_norm tst_names tst_nofill tst_nofill2 tst_nofill3 tst_meta)

View File

@ -15,9 +15,9 @@ tst_diskless3.nc tst_diskless3_file.cdl tst_diskless3_memory.cdl \
tst_diskless4.cdl tst_diskless4.nc tst_formatx.nc unlim.nc ncx.c
# These are the tests which are always run.
TESTPROGRAMS = t_nc tst_small nc_test tst_swap4b tst_misc tst_norm \
TESTPROGRAMS = t_nc tst_small nc_test tst_misc tst_norm \
tst_names tst_nofill tst_nofill2 tst_nofill3 tst_atts3 \
tst_meta tst_swap4b
tst_meta
if USE_NETCDF4
TESTPROGRAMS += tst_atts tst_put_vars
@ -32,14 +32,6 @@ endif
nc_test_SOURCES = nc_test.c error.c test_get.c test_put.c \
test_read.c test_write.c util.c error.h tests.h
##
# These are the source files for tst_swap4b.
# Note that the file 'ncx.c' lives in `libsrc/`
# and is generated by m4.
##
tst_swap4b_SOURCES = ncx.c tst_swap4b.c
LDADD = ${top_builddir}/liblib/libnetcdf.la
AM_CPPFLAGS += -I$(top_builddir)/liblib -I$(top_builddir)/include -I$(top_srcdir)/libsrc
@ -99,7 +91,7 @@ EXTRA_DIST = test_get.m4 test_put.m4 run_valgrind_tests.sh \
run_diskless.sh run_diskless2.sh run_mmap.sh run_pnetcdf_test.sh
# ref_tst_diskless2.cdl is for diff comparison and to produce tst_diskless2.c
EXTRA_DIST += ref_tst_diskless2.cdl CMakeLists.txt tst_swap4b.c
EXTRA_DIST += ref_tst_diskless2.cdl CMakeLists.txt
# Only clean these on mainatiner-clean, because they require m4 to
# regenerate.

View File

@ -1,123 +0,0 @@
/*! Test swap4b function.
*
* Test added July 27, 2015.
*
* This test confirms that the function ncx.c:swap4b() is
* working properly. For more information regarding this test
* and the circumstances prompting it, see
* https://bugtracking.unidata.ucar.edu/browse/NCF-338
*/
#include "netcdf.h"
#define SWAP4(a) ( ((a) << 24) | \
(((a) << 8) & 0x00ff0000) | \
(((a) >> 8) & 0x0000ff00) | \
(((a) >> 24) & 0x000000ff) )
/* Taken from ncx.c */
void swap4b(void *dst, const void *src);
#include <stdio.h>
/*! The 'Old' swap4b algorithm.
* The naive algorithm. Replicated here to test
* CPU bounds.
*/
void old_swap4b(void *dst, const void *src) {
char *op = dst;
const char *ip = src;
op[0] = ip[3];
op[1] = ip[2];
op[2] = ip[1];
op[3] = ip[0];
}
int main() {
unsigned int first = 0x0000ffff;
unsigned int check_first = 0xffff0000;
unsigned int second = 0xffff0000;
unsigned int check_second = 0x0000ffff;
unsigned int third = 0x00abcdef;
unsigned int check_third = 0xefcdab00;
unsigned int rev_first = 0;
unsigned int rev_second = 0;
unsigned int rev_third = 0;
printf("\n");
printf("First:\t0x%08x...\n",first);
printf("Second:\t0x%08x...\n",second);
printf("Third:\t0x%08x...\n",third);
printf("\nReversing Unsigned Integers with old swap4b\n");
old_swap4b(&rev_first,&first);
old_swap4b(&rev_second,&second);
old_swap4b(&rev_third,&third);
printf("1. Reversing 0x%08x: 0x%08x ...\t",first,rev_first);
if(rev_first == check_first) {
printf("Success!\n");
} else {
printf("Failure!\n");
return -1;
}
printf("2. Reversing 0x%08x: 0x%08x ...\t",second,rev_second);
if(rev_second == check_second) {
printf("Success!\n");
} else {
printf("Failure!\n");
return -1;
}
printf("3. Reversing 0x%08x: 0x%08x ...\t",third,rev_third);
if(rev_third == check_third) {
printf("Success!\n");
} else {
printf("Failure!\n");
return -1;
}
/* Zero out results, check with bit-shifting swap4b. */
rev_first = 0;
rev_second = 0;
rev_third = 0;
printf("\nReversing Unsigned Integers with new swap4b\n");
swap4b(&rev_first,&first);
swap4b(&rev_second,&second);
swap4b(&rev_third,&third);
printf("1. Reversing 0x%08x: 0x%08x ...\t",first,rev_first);
if(rev_first == check_first) {
printf("Success!\n");
} else {
printf("Failure!\n");
return -1;
}
printf("2. Reversing 0x%08x: 0x%08x ...\t",second,rev_second);
if(rev_second == check_second) {
printf("Success!\n");
} else {
printf("Failure!\n");
return -1;
}
printf("3. Reversing 0x%08x: 0x%08x ...\t",third,rev_third);
if(rev_third == check_third) {
printf("Success!\n");
} else {
printf("Failure!\n");
return -1;
}
printf("\nFinished.\n");
return 0;
}

View File

@ -4,14 +4,14 @@ IF(BUILD_SHARED_LIBS AND WIN32)
ENDIF()
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ctest.c
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ctest.c
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/ref_ctest.c"
"${CMAKE_CURRENT_SOURCE_DIR}/ctest.c"
"${CMAKE_CURRENT_BINARY_DIR}/ctest.c"
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ctest64.c
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ctest64.c
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/ref_ctest64.c"
"${CMAKE_CURRENT_SOURCE_DIR}/ctest64.c"
"${CMAKE_CURRENT_BINARY_DIR}/ctest64.c"
)
SET(ncdump_FILES ncdump.c vardata.c dumplib.c indent.c nctime0.c utils.c nciter.c)

View File

@ -68,16 +68,16 @@ endif #!USE_NETCDF4
BUILT_SOURCES = ctest.c ctest64.c
if EXTRA_TESTS
ctest.c:
$(top_builddir)/ncgen/ncgen -lc -o ctest0.nc $(top_srcdir)/ncgen/c0.cdl >$(srcdir)/ctest.c
$(top_builddir)/ncgen/ncgen -lc -o ctest0.nc $(top_srcdir)/ncgen/c0.cdl > $(top_builddir)/ncdump/ctest.c
ctest64.c:
$(top_builddir)/ncgen/ncgen -v2 -lc -o ctest0_64.nc $(top_srcdir)/ncgen/c0.cdl > $(srcdir)/ctest64.c
$(top_builddir)/ncgen/ncgen -v2 -lc -o ctest0_64.nc $(top_srcdir)/ncgen/c0.cdl > $(top_builddir)/ncdump/ctest64.c
else
ctest.c:
cp $(top_srcdir)/ncdump/ref_ctest.c $(top_srcdir)/ncdump/ctest.c
cp $(top_srcdir)/ncdump/ref_ctest.c $(top_builddir)/ncdump/ctest.c
ctest64.c:
cp $(top_srcdir)/ncdump/ref_ctest64.c $(top_srcdir)/ncdump/ctest64.c
cp $(top_srcdir)/ncdump/ref_ctest64.c $(top_builddir)/ncdump/ctest64.c
endif
#if !BUILD_DLL
@ -137,8 +137,7 @@ CMakeLists.txt XGetopt.c tst_bom.sh tst_inmemory.sh
# CDL files and Expected results
SUBDIRS=cdl expected
EXTRA_DIST += tst_ncgen_shared.sh tst_ncgen4.sh tst_ncgen4_classic.sh \
tst_ncgen4_diff.sh tst_ncgen4_cycle.sh ref_ctest.c ref_ctest64.c \
ctest.c ctest64.c
tst_ncgen4_diff.sh tst_ncgen4_cycle.sh ref_ctest.c ref_ctest64.c
CLEANFILES += results/*.nc results/*.dmp results/*.dmp2 tmp*.cdl tst_bug324.nc
DISTCLEANFILES = results