diff options
author | hdftest <hdftest@hdfgroup.org> | 2020-04-26 19:13:37 (GMT) |
---|---|---|
committer | hdftest <hdftest@hdfgroup.org> | 2020-04-26 19:13:37 (GMT) |
commit | 57b1f0b994bb90f5654093d90620bd7e36ebefa7 (patch) | |
tree | 3b09c2b4c7c53be66499854eaf710265c9503fe3 /c++ | |
parent | 507d8f3cdf04ddad0fb7cdb92de033fa70d07f47 (diff) | |
parent | 7015ea5ec07e5bec11c6fed75dbe34d48428cf2b (diff) | |
download | hdf5-57b1f0b994bb90f5654093d90620bd7e36ebefa7.zip hdf5-57b1f0b994bb90f5654093d90620bd7e36ebefa7.tar.gz hdf5-57b1f0b994bb90f5654093d90620bd7e36ebefa7.tar.bz2 |
Merge branch 'hdf5_1_8' of ssh://bitbucket.hdfgroup.org:7999/~hdftest/hdf5_hft into hdf5_1_8
Diffstat (limited to 'c++')
-rw-r--r-- | c++/Makefile.in | 4 | ||||
-rw-r--r-- | c++/examples/Makefile.am | 4 | ||||
-rw-r--r-- | c++/examples/Makefile.in | 8 | ||||
-rw-r--r-- | c++/examples/run-c++-ex.sh.in | 27 | ||||
-rw-r--r-- | c++/examples/testh5c++.sh.in | 2 | ||||
-rw-r--r-- | c++/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | c++/src/Makefile.in | 4 | ||||
-rw-r--r-- | c++/src/h5c++.in | 6 | ||||
-rw-r--r-- | c++/test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | c++/test/Makefile.in | 4 | ||||
-rw-r--r-- | c++/test/tobject.cpp | 6 |
11 files changed, 51 insertions, 17 deletions
diff --git a/c++/Makefile.in b/c++/Makefile.in index 3ecc49e..cd3e110 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -406,7 +406,7 @@ AMTAR = @AMTAR@ # AM_CFLAGS is an automake construct which should be used by Makefiles # instead of CFLAGS, as CFLAGS is reserved solely for the user to define. # This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@ AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -468,6 +468,7 @@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ +H5_ECFLAGS = @H5_ECFLAGS@ H5_FCFLAGS = @H5_FCFLAGS@ H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ H5_LDFLAGS = @H5_LDFLAGS@ @@ -587,6 +588,7 @@ docdir = $(exec_prefix)/doc dvidir = @dvidir@ enable_shared = @enable_shared@ enable_static = @enable_static@ +examplesdir = @examplesdir@ exec_prefix = @exec_prefix@ fortran_linux_linker_option = @fortran_linux_linker_option@ host = @host@ diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am index 51ab8e3..0648504 100644 --- a/c++/examples/Makefile.am +++ b/c++/examples/Makefile.am @@ -49,8 +49,8 @@ CXX_API=yes # Where to install examples # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++ -EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples +EXAMPLEDIR=$(examplesdir)/c++ +EXAMPLETOPDIR=$(examplesdir) # How to build programs using h5c++ $(EXTRA_PROG): $(H5CPP) diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 1358326..e2580bc 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -353,7 +353,7 @@ AMTAR = @AMTAR@ # AM_CFLAGS is an automake construct which should be used by Makefiles # instead of CFLAGS, as CFLAGS is reserved solely for the user to define. # This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@ AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -415,6 +415,7 @@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ +H5_ECFLAGS = @H5_ECFLAGS@ H5_FCFLAGS = @H5_FCFLAGS@ H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ H5_LDFLAGS = @H5_LDFLAGS@ @@ -534,6 +535,7 @@ docdir = $(exec_prefix)/doc dvidir = @dvidir@ enable_shared = @enable_shared@ enable_static = @enable_static@ +examplesdir = @examplesdir@ exec_prefix = @exec_prefix@ fortran_linux_linker_option = @fortran_linux_linker_option@ host = @host@ @@ -642,8 +644,8 @@ CXX_API = yes # Where to install examples # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++ -EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples +EXAMPLEDIR = $(examplesdir)/c++ +EXAMPLETOPDIR = $(examplesdir) # Assume that all tests in this directory are examples, and tell # conclude.am when to build them. diff --git a/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in index 315010e..d05b120 100644 --- a/c++/examples/run-c++-ex.sh.in +++ b/c++/examples/run-c++-ex.sh.in @@ -18,7 +18,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # This script will compile and run the c++ examples from source files # -# installed in .../share/hdf5_examples/c++ using h5c++. The # +# installed in @examplesdir@/c++ using h5c++. The # # order for running programs with RunTest in the MAIN section below is taken # # from the Makefile. The order is important since some of the test programs # # use data files created by earlier test programs. Any future additions should # @@ -30,9 +30,32 @@ EXIT_SUCCESS=0 EXIT_FAILURE=1 +# +# Try to derive the path to the installation $prefix established +# by ./configure relative to the examples directory established by +# ./configure. If successful, set `prefix_relto_examplesdir` to the +# relative path. Otherwise, set `prefix_relto_examplesdir` to the +# absolute installation $prefix. +# +# This script uses the value of `prefix` in the user's environment, if +# it is set, below. The content of $() is evaluated in a sub-shell, so +# if `prefix` is set in the user's environment, the shell statements in +# $() won't clobber it. +# +prefix_relto_examplesdir=$( +prefix=@prefix@ +examplesdir=@examplesdir@ +if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then + echo $(echo ${examplesdir##${prefix}/} | \ + sed 's,[^/][^/]*,..,g') +else + echo $prefix +fi +) + # Where the tool is installed. # default is relative path to installed location of the tools -prefix="${prefix:-../../../}" +prefix="${prefix:-../${prefix_relto_examplesdir}}" AR="@AR@" RANLIB="@RANLIB@" H5TOOL="h5c++" # The tool name diff --git a/c++/examples/testh5c++.sh.in b/c++/examples/testh5c++.sh.in index c82ccc3..be3669b 100644 --- a/c++/examples/testh5c++.sh.in +++ b/c++/examples/testh5c++.sh.in @@ -57,7 +57,7 @@ applib=libapp${H5TOOL}.a # short hands # Caution: if some *.h5 files must be cleaned here, list them by names. # Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated -# by otehr test programs. This will cause a racing condition error when +# by other test programs. This will cause a racing condition error when # parallel make (e.g., gmake -j 4) is used. temp_SRC="$hdf5main $appmain $prog1 $prog2" temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index ff03269..0b2aeed 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -92,6 +92,7 @@ if (NOT ONLY_SHARED_LIBS) PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) + target_compile_options(${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}") target_compile_definitions(${HDF5_CPP_LIB_TARGET} PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings ) @@ -109,6 +110,7 @@ if (BUILD_SHARED_LIBS) PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) + target_compile_options(${HDF5_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}") target_compile_definitions(${HDF5_CPP_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 7ad81a0..dfe99da 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -417,7 +417,7 @@ AMTAR = @AMTAR@ # AM_CFLAGS is an automake construct which should be used by Makefiles # instead of CFLAGS, as CFLAGS is reserved solely for the user to define. # This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@ # Include src directory AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src @@ -481,6 +481,7 @@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ +H5_ECFLAGS = @H5_ECFLAGS@ H5_FCFLAGS = @H5_FCFLAGS@ H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ H5_LDFLAGS = @H5_LDFLAGS@ @@ -600,6 +601,7 @@ docdir = $(exec_prefix)/doc dvidir = @dvidir@ enable_shared = @enable_shared@ enable_static = @enable_static@ +examplesdir = @examplesdir@ exec_prefix = @exec_prefix@ fortran_linux_linker_option = @fortran_linux_linker_option@ host = @host@ diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in index 00502d9..f068f51 100644 --- a/c++/src/h5c++.in +++ b/c++/src/h5c++.in @@ -38,7 +38,7 @@ HL="@HL@" ## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ## ## $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link ## ## ## -## These settings can be overriden by setting HDF5_CXXFLAGS, ## +## These settings can be overridden by setting HDF5_CXXFLAGS, ## ## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ## ## ## ############################################################################ @@ -140,7 +140,7 @@ usage() { echo " [default: no except when built with only" echo " shared libraries]" echo " You can also add or change paths and flags to the compile line using" - echo " the following environment varibles or by assigning them to their counterparts" + echo " the following environment variables or by assigning them to their counterparts" echo " in the 'Things You Can Modify to Override...'" section of $prog_name echo " " echo " Variable Current value to be replaced" @@ -311,7 +311,7 @@ fi if test "x$do_link" = "xyes"; then shared_link="" - # conditionnaly link with the hl library + # conditionally link with the hl library if test "X$HL" = "Xhl"; then libraries=" $libraries -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5 " else diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index c171664..3eb08f4 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -38,6 +38,7 @@ configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @O add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ) target_include_directories (cpp_testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +target_compile_options(cpp_testhdf5 PRIVATE "${HDF5_CMAKE_CXX_FLAGS}") target_compile_definitions(cpp_testhdf5 PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings ) diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index c08ce1e..db66730 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -405,7 +405,7 @@ AMTAR = @AMTAR@ # AM_CFLAGS is an automake construct which should be used by Makefiles # instead of CFLAGS, as CFLAGS is reserved solely for the user to define. # This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@ # Include src, test, and c++/src directories AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ @@ -470,6 +470,7 @@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ +H5_ECFLAGS = @H5_ECFLAGS@ H5_FCFLAGS = @H5_FCFLAGS@ H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ H5_LDFLAGS = @H5_LDFLAGS@ @@ -589,6 +590,7 @@ docdir = $(exec_prefix)/doc dvidir = @dvidir@ enable_shared = @enable_shared@ enable_static = @enable_static@ +examplesdir = @examplesdir@ exec_prefix = @exec_prefix@ fortran_linux_linker_option = @fortran_linux_linker_option@ host = @host@ diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp index b5e9ff0..095fe6a 100644 --- a/c++/test/tobject.cpp +++ b/c++/test/tobject.cpp @@ -76,7 +76,7 @@ static void test_get_objname() // Attempted to create a same group to generate a failure, which should // be caught with sub-class exception clause, if available. try { - Group grp1_2 = grp1.createGroup(GROUP1_2, 0); + grp1_2 = grp1.createGroup(GROUP1_2, 0); } catch (GroupIException& E) {} // do nothing, exception expected @@ -301,7 +301,7 @@ static void test_get_objtype() issue_fail_msg("test_get_objtype", __LINE__, __FILE__); } } // test_get_objtype - + /*------------------------------------------------------------------------- * Function: test_open_object_header * @@ -435,7 +435,7 @@ static void test_open_object_header() issue_fail_msg("test_file_name()", __LINE__, __FILE__, E.getCDetailMsg()); } } /* test_open_object_header() */ - + /*------------------------------------------------------------------------- * Function: test_is_valid * |