From 2154d1c6f1b791a2ba9125a48a098fd4da42f01f Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 31 Aug 2014 05:31:14 -0500 Subject: [svn-r25563] Snapshot version 1.9 release 194 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index 2612183..863a277 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.194 currently under development +HDF5 version 1.9.195 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index b7fb619..00647f8 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -681,7 +681,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 = 184 +LT_VERS_REVISION = 185 LT_VERS_AGE = 0 # This is our main target diff --git a/config/lt_vers.am b/config/lt_vers.am index 1a2e167..e3ba82a 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 184 +LT_VERS_REVISION = 185 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 91e8950..2dca279 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.194. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.195. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.194' -PACKAGE_STRING='HDF5 1.9.194' +PACKAGE_VERSION='1.9.195' +PACKAGE_STRING='HDF5 1.9.195' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1489,7 +1489,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.194 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.195 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1559,7 +1559,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.194:";; + short | recursive ) echo "Configuration of HDF5 1.9.195:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.194 +HDF5 configure 1.9.195 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.194, which was +It was created by HDF5 $as_me 1.9.195, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3717,7 +3717,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.194' + VERSION='1.9.195' cat >>confdefs.h <<_ACEOF @@ -31732,7 +31732,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.194 +HDF5 config.lt 1.9.195 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33874,7 +33874,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.194, which was +This file was extended by HDF5 $as_me 1.9.195, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33940,7 +33940,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.194 +HDF5 config.status 1.9.195 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 9a46ba3..78a4ca9 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.194], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.195], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 96234ee..2b40328 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -732,7 +732,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 = 184 +LT_VERS_REVISION = 185 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 7418d94..0c7a6b8 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -673,7 +673,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 = 184 +LT_VERS_REVISION = 185 LT_VERS_AGE = 0 # This is our main target diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 6a35295..7b811de 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -688,7 +688,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 = 184 +LT_VERS_REVISION = 185 LT_VERS_AGE = 0 # Our main target, the high-level fortran library diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 381f008..908c3ee 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -669,7 +669,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 = 184 +LT_VERS_REVISION = 185 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f5ba11f..b990342 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.194 currently under development +HDF5 version 1.9.195 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 4dbf724..4b87514 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 194 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 195 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.194" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.195" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index c6768a5..10ffd93 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -731,7 +731,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 = 184 +LT_VERS_REVISION = 185 LT_VERS_AGE = 0 # Our main target, the HDF5 library diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 9410d6c..2610a4b 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -501,7 +501,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.194" +#define H5_PACKAGE_STRING "HDF5 1.9.195" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -510,7 +510,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.194" +#define H5_PACKAGE_VERSION "1.9.195" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -673,7 +673,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.194" +#define H5_VERSION "1.9.195" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From c23f3a7ea577b66f103ab06e9310e819c13f5401 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 3 Sep 2014 12:12:52 -0500 Subject: [svn-r25569] Added option to build tools static when building shared libraries. This will prevent 'dll' being appended to the tool name on windows. See HDFFV-8292. Tested: local linux --- CMakeLists.txt | 2 +- config/cmake/hdf5-config-version.cmake.in | 46 ++++++++++++++++++++++--------- release_docs/INSTALL_CMake.txt | 1 + release_docs/RELEASE.txt | 4 +++ src/CMakeLists.txt | 18 +++++++++++- tools/h5copy/CMakeLists.txt | 11 ++++++-- tools/h5diff/CMakeLists.txt | 18 +++++++++--- tools/h5dump/CMakeLists.txt | 9 ++++-- tools/h5import/CMakeLists.txt | 9 ++++-- tools/h5jam/CMakeLists.txt | 36 ++++++++++++++++++------ tools/h5ls/CMakeLists.txt | 9 ++++-- tools/h5repack/CMakeLists.txt | 9 ++++-- tools/h5stat/CMakeLists.txt | 9 ++++-- tools/lib/CMakeLists.txt | 13 ++++++++- tools/misc/CMakeLists.txt | 27 ++++++++++++++---- 15 files changed, 174 insertions(+), 47 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6877b6a..a584e89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,8 +283,8 @@ if (BUILD_SHARED_LIBS) else (BUILD_SHARED_LIBS) set (H5_BUILT_AS_STATIC_LIB 1) set (H5_ENABLE_STATIC_LIB YES) - set (CMAKE_POSITION_INDEPENDENT_CODE ON) endif (BUILD_SHARED_LIBS) +set (CMAKE_POSITION_INDEPENDENT_CODE ON) #----------------------------------------------------------------------------- # Option to Build Static executables diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in index 148a659..63a730f 100644 --- a/config/cmake/hdf5-config-version.cmake.in +++ b/config/cmake/hdf5-config-version.cmake.in @@ -1,27 +1,47 @@ #----------------------------------------------------------------------------- # HDF5 Version file for install directory #----------------------------------------------------------------------------- +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, +# but only if the requested major.minor version is the same as the current one. +# The variable HDF5_VERSION_STRING must be set before calling configure_file(). -set (PACKAGE_VERSION @HDF5_VERSION_STRING@) +set (PACKAGE_VERSION "@HDF5_VERSION_STRING@") -if ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@) +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + +if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@") # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@ - if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@) + if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@") # compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x - set (PACKAGE_VERSION_COMPATIBLE 1) + set (PACKAGE_VERSION_COMPATIBLE TRUE) - if ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@) - set (PACKAGE_VERSION_EXACT 1) + if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H5_VERS_RELEASE@") + set (PACKAGE_VERSION_EXACT TRUE) - if ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@) + if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H5_VERS_SUBRELEASE@") # not using this yet - endif ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@) - - endif ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@) - - endif ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@) -endif ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@) + endif ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H5_VERS_SUBRELEASE@") + endif ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H5_VERS_RELEASE@") + else ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@") + set (PACKAGE_VERSION_COMPATIBLE FALSE) + endif ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@") +endif ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@") +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") + return() +endif() +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@") + math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 31e3917..29c542a 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -554,6 +554,7 @@ HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF +ONLY_STATIC_TOOLS "Build Only Static Tools" OFF if (HDF5_BUILD_FORTRAN) HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b990342..665fc51 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -41,6 +41,10 @@ New Features Configuration: ------------- + - CMake: Added option to build only tools static. This can be used when building + the libraries as shared. For release binaries on Windows, this option prevents + the tools being named with 'dll' being appended, see HDFFV-8292 + (ADB 2014/09/03) - Autotools: Automake updated to 1.14.1 (ADB - 2014/04/08) - CMake: Moved minimum CMake version to 2.8.11 which enables better library include processing. (ADB - 2014/03/26) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d5d57d4..fd02ef7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -858,7 +858,8 @@ set_source_files_properties (${HDF5_BINARY_DIR}/H5version.h GENERATED) set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h) set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED) -add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) +add_library (${HDF5_LIB_TARGET}_obj OBJECT ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) +add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} $) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} " " " ") target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) if (NOT WIN32) @@ -873,6 +874,21 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +if (ONLY_STATIC_TOOLS) + add_library (${HDF5_LIB_TARGET}_static STATIC $) + TARGET_C_PROPERTIES (${HDF5_LIB_TARGET}_static " " " ") + target_link_libraries (${HDF5_LIB_TARGET}_static ${LINK_LIBS}) + if (NOT WIN32) + target_link_libraries (${HDF5_LIB_TARGET}_static dl) + endif (NOT WIN32) + if (H5_HAVE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (${HDF5_LIB_TARGET}_static ${MPI_C_LIBRARIES}) + endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) + H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET}_static ${HDF5_LIB_NAME} STATIC) + set_target_properties (${HDF5_LIB_TARGET}_static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + ) +endif (ONLY_STATIC_TOOLS) option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF) if (HDF5_ENABLE_DEBUG_APIS) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 267d92b..6f42f5a 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -9,11 +9,16 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- # Add the h5copy and test executables # -------------------------------------------------------------------- -add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c) -TARGET_NAMING (h5copy ${LIB_TYPE}) +add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c ) TARGET_C_PROPERTIES (h5copy " " " ") -target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5copy PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5copy STATIC) + target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5copy ${LIB_TYPE}) + target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5copy) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 35c55a4..4e38fe1 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -13,10 +13,15 @@ add_executable (h5diff ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c ) -TARGET_NAMING (h5diff ${LIB_TYPE}) TARGET_C_PROPERTIES (h5diff " " " ") -target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5diff PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5diff STATIC) + target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5diff ${LIB_TYPE}) + target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5diff) @@ -25,10 +30,15 @@ if (H5_HAVE_PARALLEL) ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c ) - TARGET_NAMING (ph5diff ${LIB_TYPE}) TARGET_C_PROPERTIES (ph5diff " " " ") - target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (ph5diff PROPERTIES FOLDER tools) + if (ONLY_STATIC_TOOLS) + TARGET_NAMING (ph5diff STATIC) + target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) + else (ONLY_STATIC_TOOLS) + TARGET_NAMING (ph5diff ${LIB_TYPE}) + target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) + endif (ONLY_STATIC_TOOLS) endif (H5_HAVE_PARALLEL) if (BUILD_TESTING) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 584222e..4f30ce6 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -14,10 +14,15 @@ add_executable (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) -TARGET_NAMING (h5dump ${LIB_TYPE}) TARGET_C_PROPERTIES (h5dump " " " ") -target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5dump PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5dump STATIC) + target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5dump ${LIB_TYPE}) + target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5dump) diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index a18133f..7ba91fc 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -10,11 +10,16 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) -TARGET_NAMING (h5import ${LIB_TYPE}) TARGET_C_PROPERTIES (h5import " " " ") -target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) #set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) set_target_properties (h5import PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5import STATIC) + target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5import ${LIB_TYPE}) + target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5import) diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index a8e3a7c..bf6a0ef 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -10,28 +10,48 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5jam executables # -------------------------------------------------------------------- add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c) -TARGET_NAMING (h5jam ${LIB_TYPE}) TARGET_C_PROPERTIES (h5jam " " " ") -target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5jam PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5jam STATIC) + target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5jam ${LIB_TYPE}) + target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c) -TARGET_NAMING (getub ${LIB_TYPE}) TARGET_C_PROPERTIES (getub " " " ") -target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (getub STATIC) + target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (getub ${LIB_TYPE}) + target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c) -TARGET_NAMING (tellub ${LIB_TYPE}) TARGET_C_PROPERTIES (tellub " " " ") -target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (tellub STATIC) + target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (tellub ${LIB_TYPE}) + target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c) -TARGET_NAMING (h5unjam ${LIB_TYPE}) TARGET_C_PROPERTIES (h5unjam " " " ") -target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5unjam PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5unjam STATIC) + target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5unjam ${LIB_TYPE}) + target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5jam diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index f3749e3..7dbdbf4 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -10,10 +10,15 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5ls executable #----------------------------------------------------------------------------- add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) -TARGET_NAMING (h5ls ${LIB_TYPE}) TARGET_C_PROPERTIES (h5ls " " " ") -target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5ls STATIC) + target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5ls ${LIB_TYPE}) + target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5ls diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index cb8720e..a45e3a5 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -21,10 +21,15 @@ set (REPACK_COMMON_SRCS ) add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) -TARGET_NAMING (h5repack ${LIB_TYPE}) TARGET_C_PROPERTIES (h5repack " " " ") -target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5repack PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5repack STATIC) + target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5repack ${LIB_TYPE}) + target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5repack) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 0658216..045f632 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -10,10 +10,15 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5stat executables # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) -TARGET_NAMING (h5stat ${LIB_TYPE}) TARGET_C_PROPERTIES (h5stat " " " ") -target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5stat STATIC) + target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5stat ${LIB_TYPE}) + target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5stat) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index e65673a..8c1cdb6 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_LIB) +option (ONLY_STATIC_TOOLS "Build Only Static Tools" OFF) #----------------------------------------------------------------------------- # Apply Definitions to compiler in this directory and below #----------------------------------------------------------------------------- @@ -36,7 +37,8 @@ set (H5_TOOLS_LIB_HDRS ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h ) -add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) +add_library (${HDF5_TOOLS_LIB_TARGET}_obj OBJECT ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) +add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} $) TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} " " " ") target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") @@ -51,6 +53,15 @@ set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +if (ONLY_STATIC_TOOLS) + add_library (${HDF5_TOOLS_LIB_TARGET}_static STATIC $) + TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET}_static " " " ") + target_link_libraries (${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) + H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_TOOLS_LIB_NAME} STATIC) + set_target_properties (${HDF5_TOOLS_LIB_TARGET}_static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + ) +endif (ONLY_STATIC_TOOLS) ############################################################################## ############################################################################## diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 8af05b4..3b08e1b 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -11,22 +11,37 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- #-- Misc Executables add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) -TARGET_NAMING (h5debug ${LIB_TYPE}) TARGET_C_PROPERTIES (h5debug " " " ") -target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5debug PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5debug STATIC) + target_link_libraries (h5debug ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5debug ${LIB_TYPE}) + target_link_libraries (h5debug ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c) -TARGET_NAMING (h5repart ${LIB_TYPE}) TARGET_C_PROPERTIES (h5repart " " " ") -target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5repart STATIC) + target_link_libraries (h5repart ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5repart ${LIB_TYPE}) + target_link_libraries (h5repart ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c) -TARGET_NAMING (h5mkgrp ${LIB_TYPE}) TARGET_C_PROPERTIES (h5mkgrp " " " ") -target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5mkgrp PROPERTIES FOLDER tools) +if (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5mkgrp STATIC) + target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) +else (ONLY_STATIC_TOOLS) + TARGET_NAMING (h5mkgrp ${LIB_TYPE}) + target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5debug -- cgit v0.12 From 5a4357e4fb0b920c46cae32e446a662dd44ed7f9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 3 Sep 2014 14:04:18 -0500 Subject: [svn-r25570] UNDO:Added option to build tools static when building shared libraries. This will prevent 'dll' being appended to the tool name on windows. See HDFFV-8292. Windows DLL linkage problem because of defines needed. Tested: local linux --- CMakeLists.txt | 2 +- release_docs/INSTALL_CMake.txt | 1 - release_docs/RELEASE.txt | 4 ---- src/CMakeLists.txt | 18 +----------------- tools/h5copy/CMakeLists.txt | 11 +++-------- tools/h5diff/CMakeLists.txt | 18 ++++-------------- tools/h5dump/CMakeLists.txt | 9 ++------- tools/h5import/CMakeLists.txt | 9 ++------- tools/h5jam/CMakeLists.txt | 36 ++++++++---------------------------- tools/h5ls/CMakeLists.txt | 9 ++------- tools/h5repack/CMakeLists.txt | 9 ++------- tools/h5stat/CMakeLists.txt | 9 ++------- tools/lib/CMakeLists.txt | 13 +------------ tools/misc/CMakeLists.txt | 27 ++++++--------------------- 14 files changed, 34 insertions(+), 141 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a584e89..6877b6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,8 +283,8 @@ if (BUILD_SHARED_LIBS) else (BUILD_SHARED_LIBS) set (H5_BUILT_AS_STATIC_LIB 1) set (H5_ENABLE_STATIC_LIB YES) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) endif (BUILD_SHARED_LIBS) -set (CMAKE_POSITION_INDEPENDENT_CODE ON) #----------------------------------------------------------------------------- # Option to Build Static executables diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 29c542a..31e3917 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -554,7 +554,6 @@ HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF -ONLY_STATIC_TOOLS "Build Only Static Tools" OFF if (HDF5_BUILD_FORTRAN) HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 665fc51..b990342 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -41,10 +41,6 @@ New Features Configuration: ------------- - - CMake: Added option to build only tools static. This can be used when building - the libraries as shared. For release binaries on Windows, this option prevents - the tools being named with 'dll' being appended, see HDFFV-8292 - (ADB 2014/09/03) - Autotools: Automake updated to 1.14.1 (ADB - 2014/04/08) - CMake: Moved minimum CMake version to 2.8.11 which enables better library include processing. (ADB - 2014/03/26) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fd02ef7..d5d57d4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -858,8 +858,7 @@ set_source_files_properties (${HDF5_BINARY_DIR}/H5version.h GENERATED) set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h) set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED) -add_library (${HDF5_LIB_TARGET}_obj OBJECT ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) -add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} $) +add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} " " " ") target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) if (NOT WIN32) @@ -874,21 +873,6 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) -if (ONLY_STATIC_TOOLS) - add_library (${HDF5_LIB_TARGET}_static STATIC $) - TARGET_C_PROPERTIES (${HDF5_LIB_TARGET}_static " " " ") - target_link_libraries (${HDF5_LIB_TARGET}_static ${LINK_LIBS}) - if (NOT WIN32) - target_link_libraries (${HDF5_LIB_TARGET}_static dl) - endif (NOT WIN32) - if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${HDF5_LIB_TARGET}_static ${MPI_C_LIBRARIES}) - endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) - H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET}_static ${HDF5_LIB_NAME} STATIC) - set_target_properties (${HDF5_LIB_TARGET}_static PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - ) -endif (ONLY_STATIC_TOOLS) option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF) if (HDF5_ENABLE_DEBUG_APIS) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 6f42f5a..267d92b 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -9,16 +9,11 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- # Add the h5copy and test executables # -------------------------------------------------------------------- -add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c ) +add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c) +TARGET_NAMING (h5copy ${LIB_TYPE}) TARGET_C_PROPERTIES (h5copy " " " ") +target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5copy PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5copy STATIC) - target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5copy ${LIB_TYPE}) - target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5copy) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 4e38fe1..35c55a4 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -13,15 +13,10 @@ add_executable (h5diff ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c ) +TARGET_NAMING (h5diff ${LIB_TYPE}) TARGET_C_PROPERTIES (h5diff " " " ") +target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5diff PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5diff STATIC) - target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5diff ${LIB_TYPE}) - target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5diff) @@ -30,15 +25,10 @@ if (H5_HAVE_PARALLEL) ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c ) + TARGET_NAMING (ph5diff ${LIB_TYPE}) TARGET_C_PROPERTIES (ph5diff " " " ") + target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (ph5diff PROPERTIES FOLDER tools) - if (ONLY_STATIC_TOOLS) - TARGET_NAMING (ph5diff STATIC) - target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) - else (ONLY_STATIC_TOOLS) - TARGET_NAMING (ph5diff ${LIB_TYPE}) - target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) - endif (ONLY_STATIC_TOOLS) endif (H5_HAVE_PARALLEL) if (BUILD_TESTING) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 4f30ce6..584222e 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -14,15 +14,10 @@ add_executable (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) +TARGET_NAMING (h5dump ${LIB_TYPE}) TARGET_C_PROPERTIES (h5dump " " " ") +target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5dump PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5dump STATIC) - target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5dump ${LIB_TYPE}) - target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5dump) diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 7ba91fc..a18133f 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -10,16 +10,11 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) +TARGET_NAMING (h5import ${LIB_TYPE}) TARGET_C_PROPERTIES (h5import " " " ") +target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) #set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) set_target_properties (h5import PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5import STATIC) - target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5import ${LIB_TYPE}) - target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5import) diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index bf6a0ef..a8e3a7c 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -10,48 +10,28 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5jam executables # -------------------------------------------------------------------- add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c) +TARGET_NAMING (h5jam ${LIB_TYPE}) TARGET_C_PROPERTIES (h5jam " " " ") +target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5jam PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5jam STATIC) - target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5jam ${LIB_TYPE}) - target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c) +TARGET_NAMING (getub ${LIB_TYPE}) TARGET_C_PROPERTIES (getub " " " ") +target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (getub STATIC) - target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (getub ${LIB_TYPE}) - target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c) +TARGET_NAMING (tellub ${LIB_TYPE}) TARGET_C_PROPERTIES (tellub " " " ") +target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (tellub STATIC) - target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (tellub ${LIB_TYPE}) - target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c) +TARGET_NAMING (h5unjam ${LIB_TYPE}) TARGET_C_PROPERTIES (h5unjam " " " ") +target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5unjam PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5unjam STATIC) - target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5unjam ${LIB_TYPE}) - target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5jam diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 7dbdbf4..f3749e3 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -10,15 +10,10 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5ls executable #----------------------------------------------------------------------------- add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) +TARGET_NAMING (h5ls ${LIB_TYPE}) TARGET_C_PROPERTIES (h5ls " " " ") +target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5ls STATIC) - target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5ls ${LIB_TYPE}) - target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5ls diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index a45e3a5..cb8720e 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -21,15 +21,10 @@ set (REPACK_COMMON_SRCS ) add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) +TARGET_NAMING (h5repack ${LIB_TYPE}) TARGET_C_PROPERTIES (h5repack " " " ") +target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5repack PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5repack STATIC) - target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5repack ${LIB_TYPE}) - target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5repack) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 045f632..0658216 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -10,15 +10,10 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5stat executables # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) +TARGET_NAMING (h5stat ${LIB_TYPE}) TARGET_C_PROPERTIES (h5stat " " " ") +target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5stat STATIC) - target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5stat ${LIB_TYPE}) - target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5stat) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 8c1cdb6..e65673a 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_LIB) -option (ONLY_STATIC_TOOLS "Build Only Static Tools" OFF) #----------------------------------------------------------------------------- # Apply Definitions to compiler in this directory and below #----------------------------------------------------------------------------- @@ -37,8 +36,7 @@ set (H5_TOOLS_LIB_HDRS ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h ) -add_library (${HDF5_TOOLS_LIB_TARGET}_obj OBJECT ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) -add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} $) +add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} " " " ") target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") @@ -53,15 +51,6 @@ set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) -if (ONLY_STATIC_TOOLS) - add_library (${HDF5_TOOLS_LIB_TARGET}_static STATIC $) - TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET}_static " " " ") - target_link_libraries (${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) - H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_TOOLS_LIB_NAME} STATIC) - set_target_properties (${HDF5_TOOLS_LIB_TARGET}_static PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - ) -endif (ONLY_STATIC_TOOLS) ############################################################################## ############################################################################## diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 3b08e1b..8af05b4 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -11,37 +11,22 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- #-- Misc Executables add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) +TARGET_NAMING (h5debug ${LIB_TYPE}) TARGET_C_PROPERTIES (h5debug " " " ") +target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5debug PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5debug STATIC) - target_link_libraries (h5debug ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5debug ${LIB_TYPE}) - target_link_libraries (h5debug ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c) +TARGET_NAMING (h5repart ${LIB_TYPE}) TARGET_C_PROPERTIES (h5repart " " " ") +target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5repart STATIC) - target_link_libraries (h5repart ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5repart ${LIB_TYPE}) - target_link_libraries (h5repart ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c) +TARGET_NAMING (h5mkgrp ${LIB_TYPE}) TARGET_C_PROPERTIES (h5mkgrp " " " ") +target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5mkgrp PROPERTIES FOLDER tools) -if (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5mkgrp STATIC) - target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET}_static ${HDF5_LIB_TARGET}_static) -else (ONLY_STATIC_TOOLS) - TARGET_NAMING (h5mkgrp ${LIB_TYPE}) - target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -endif (ONLY_STATIC_TOOLS) set (H5_DEP_EXECUTABLES h5debug -- cgit v0.12 From ace4fef4d61047afb08abce8ddd36ea69c8814c9 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Fri, 5 Sep 2014 14:30:42 -0500 Subject: [svn-r25573] fix error output when dataset verify detects wrong data. --- testpar/t_coll_chunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index 11d7b10..ab9de09 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -1266,7 +1266,7 @@ ccdataset_vrfy(hsize_t start[], if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){ printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n", (unsigned long)i, (unsigned long)j, - *(original), *(dataset)); + *(oriptr), *(dataptr)); } } } -- cgit v0.12