diff options
Diffstat (limited to 'hl/c++')
-rw-r--r-- | hl/c++/CMakeLists.txt | 2 | ||||
-rw-r--r-- | hl/c++/Makefile.in | 2 | ||||
-rw-r--r-- | hl/c++/examples/CMakeLists.txt | 13 | ||||
-rw-r--r-- | hl/c++/examples/Makefile.am | 5 | ||||
-rw-r--r-- | hl/c++/examples/Makefile.in | 7 | ||||
-rw-r--r-- | hl/c++/examples/ptExampleVL.cpp | 112 | ||||
-rw-r--r-- | hl/c++/examples/run-hlc++-ex.sh.in | 4 | ||||
-rw-r--r-- | hl/c++/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | hl/c++/src/Makefile.in | 4 | ||||
-rw-r--r-- | hl/c++/test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | hl/c++/test/Makefile.in | 2 |
11 files changed, 14 insertions, 141 deletions
diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index 3601a91..8d68dd0 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_HL_CPP) #----------------------------------------------------------------------------- diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 4a33b33..60baefe 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -227,6 +227,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -278,7 +279,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 3034a78..4c60165 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_HL_CPP_EXAMPLES) #----------------------------------------------------------------------------- @@ -20,17 +20,6 @@ TARGET_LINK_LIBRARIES ( ) SET_TARGET_PROPERTIES (ptExampleFL PROPERTIES FOLDER examples/hl/cpp) -ADD_EXECUTABLE (ptExampleVL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleVL.cpp) -TARGET_NAMING (ptExampleVL ${LIB_TYPE}) -TARGET_LINK_LIBRARIES ( - ptExampleVL - ${HDF5_HL_CPP_LIB_TARGET} - ${HDF5_HL_LIB_TARGET} - ${HDF5_LIB_TARGET} -) -SET_TARGET_PROPERTIES (ptExampleVL PROPERTIES FOLDER examples/hl/cpp) - IF (BUILD_TESTING) ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>) - ADD_TEST (NAME cpp_hl_ex_ptExampleVL COMMAND $<TARGET_FILE:ptExampleVL>) ENDIF (BUILD_TESTING) diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am index 5dd5a75..df15257 100644 --- a/hl/c++/examples/Makefile.am +++ b/hl/c++/examples/Makefile.am @@ -23,10 +23,10 @@ include $(top_srcdir)/config/commence.am # These are the programs that 'make all' or 'make prog' will build and # which 'make check' will run. List them in the order they should be run. -EXAMPLE_PROG=ptExampleFL ptExampleVL +EXAMPLE_PROG=ptExampleFL # These are the example files to be installed -INSTALL_FILES=ptExampleFL.cpp ptExampleVL.cpp +INSTALL_FILES=ptExampleFL.cpp INSTALL_SCRIPT_FILES = run-hlc++-ex.sh # Tell conclude.am that these are C++ tests. @@ -45,7 +45,6 @@ $(EXTRA_PROG): $(H5CPP) # will try to build them with the normal C++ compiler, not h5c++. This is # an inelegant way of solving the problem, unfortunately. ptExampleFL: ptExampleFL.cpp -ptExampleVL: ptExampleVL.cpp include $(top_srcdir)/config/examples.am include $(top_srcdir)/config/conclude.am diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index bd0edf0..8297d0a 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -193,6 +193,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -244,7 +245,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ @@ -390,10 +390,10 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 # These are the programs that 'make all' or 'make prog' will build and # which 'make check' will run. List them in the order they should be run. -EXAMPLE_PROG = ptExampleFL ptExampleVL +EXAMPLE_PROG = ptExampleFL # These are the example files to be installed -INSTALL_FILES = ptExampleFL.cpp ptExampleVL.cpp +INSTALL_FILES = ptExampleFL.cpp INSTALL_SCRIPT_FILES = run-hlc++-ex.sh # Tell conclude.am that these are C++ tests. @@ -651,7 +651,6 @@ $(EXTRA_PROG): $(H5CPP) # will try to build them with the normal C++ compiler, not h5c++. This is # an inelegant way of solving the problem, unfortunately. ptExampleFL: ptExampleFL.cpp -ptExampleVL: ptExampleVL.cpp # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/hl/c++/examples/ptExampleVL.cpp b/hl/c++/examples/ptExampleVL.cpp deleted file mode 100644 index c3feccd..0000000 --- a/hl/c++/examples/ptExampleVL.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "H5PacketTable.h" - -/*------------------------------------------------------------------------- - * Packet Table Variable-Length Example - * - * Example program that creates a packet table and performs - * writes and reads. - * - *------------------------------------------------------------------------- - */ - -int main(void) -{ -#ifdef VLPT_REMOVED - herr_t err; /* Return value from function calls */ - hid_t fileID; /* HDF5 identifier for file */ - hsize_t count; /* Number of records in table */ - int x; /* Loop variable */ - - /* This example has two different sizes of "record": longs and shorts */ - long longBuffer[5]; - short shortBuffer[5]; - - /* Buffer of hvl_t structs to read back records */ - hvl_t readBuffer[5]; - - /* Initialize buffers */ - for(x=0; x<5; x++) - { - longBuffer[x] = -x; - shortBuffer[x] = x; - } - - /* Create a new HDF5 file */ - fileID = H5Fcreate("PTcppexampleVL.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if(fileID <0) - fprintf(stderr, "Couldn't create file.\n"); - - /* Create a variable-length packet table. */ - VL_PacketTable ptable(fileID, "/examplePacketTable", 1); - - if(! ptable.IsValid()) - fprintf(stderr, "Unable to create packet table."); - - /* Append five packets to the packet table. */ - /* In C++, there is no need to package data into hvl_t structs. */ - err = ptable.AppendPacket( &(longBuffer[0]), sizeof(long)); - if(err < 0) - fprintf(stderr, "Error adding record."); - err = ptable.AppendPacket( &(shortBuffer[1]), sizeof(short)); - if(err < 0) - fprintf(stderr, "Error adding record."); - err = ptable.AppendPacket( &(longBuffer[2]), sizeof(long)); - if(err < 0) - fprintf(stderr, "Error adding record."); - err = ptable.AppendPacket( &(longBuffer[3]), sizeof(long)); - if(err < 0) - fprintf(stderr, "Error adding record."); - err = ptable.AppendPacket( &(shortBuffer[4]), sizeof(short)); - if(err < 0) - fprintf(stderr, "Error adding record."); - - /* Get the number of packets in the packet table. This should be five. */ - count = ptable.GetPacketCount(err); - if(err < 0) - fprintf(stderr, "Error getting packet count."); - - printf("Number of packets in packet table after five appends: %d\n", count); - - /* Initialize packet table's "current record" */ - ptable.ResetIndex(); - - /* Iterate through packets, read each one back */ - for(x=0; x<5; x++) - { - err = ptable.GetNextPacket( &(readBuffer[x]) ); - if(err < 0) - fprintf(stderr, "Error reading record."); - - printf("Packet %d's length is %d.\n", x, readBuffer[x].len); - if(readBuffer[x].len == sizeof(long)) - printf("Packet %d's value is %d.\n", x, *((long *) readBuffer[x].p) ); - else - printf("Packet %d's value is %d.\n", x, *((short *) readBuffer[x].p) ); - } - - /* The packet table will close automatically when its object goes */ - /* out of scope. */ - - err = H5Fclose(fileID); - if( err < 0 ) - fprintf(stderr, "Failed to close file.\n"); - -#endif /* VLPT_REMOVED */ - return 0; -} - diff --git a/hl/c++/examples/run-hlc++-ex.sh.in b/hl/c++/examples/run-hlc++-ex.sh.in index 7742f99..103dd76 100644 --- a/hl/c++/examples/run-hlc++-ex.sh.in +++ b/hl/c++/examples/run-hlc++-ex.sh.in @@ -64,9 +64,7 @@ RunTest() if [ $? -eq 0 ] then if (RunTest ptExampleFL &&\ - rm ptExampleFL &&\ - RunTest ptExampleVL &&\ - rm ptExampleVL); then + rm ptExampleFL); then EXIT_VALUE=${EXIT_SUCCESS} else EXIT_VALUE=${EXIT_FAILURE} diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index e0ca0e9..5a2a7c4 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_HL_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 7943459..89aee46 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -260,6 +260,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -311,7 +312,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 127 +LT_VERS_REVISION = 138 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index 7d29035..0f82748 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_HL_CPP_TEST) #----------------------------------------------------------------------------- diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 0213f38..f8ad89b 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -226,6 +226,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -277,7 +278,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ |