summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-10-14 17:35:40 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-10-14 17:35:40 (GMT)
commit06b2da91654ec879064dfd1205a4452b402a948d (patch)
tree1aaca1227a04bdde1c620ab9e7acf98f36274d07
parentb00920b338a35147556591ced6e4a44b81ce7187 (diff)
downloadhdf5-06b2da91654ec879064dfd1205a4452b402a948d.zip
hdf5-06b2da91654ec879064dfd1205a4452b402a948d.tar.gz
hdf5-06b2da91654ec879064dfd1205a4452b402a948d.tar.bz2
Add namespace and export utils
-rw-r--r--CMakeInstallation.cmake4
-rw-r--r--CMakeLists.txt2
-rw-r--r--c++/src/CMakeLists.txt1
-rw-r--r--config/cmake/README.txt.cmake.in2
-rw-r--r--config/cmake/hdf5-config.cmake.in4
-rw-r--r--config/cmake/mccacheinit.cmake2
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake16
-rw-r--r--config/cmake_ext_mod/FindMPI.cmake76
-rw-r--r--fortran/src/CMakeLists.txt3
-rw-r--r--hl/c++/src/CMakeLists.txt1
-rw-r--r--hl/fortran/src/CMakeLists.txt3
-rw-r--r--hl/src/CMakeLists.txt2
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt2
-rw-r--r--release_docs/INSTALL_CMake.txt36
-rw-r--r--release_docs/RELEASE.txt6
-rw-r--r--release_docs/USING_CMake_Examples.txt2
-rw-r--r--release_docs/USING_HDF5_CMake.txt38
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--tools/h5copy/CMakeLists.txt3
-rw-r--r--tools/h5diff/CMakeLists.txt6
-rw-r--r--tools/h5dump/CMakeLists.txt3
-rw-r--r--tools/h5import/CMakeLists.txt1
-rw-r--r--tools/h5jam/CMakeLists.txt6
-rw-r--r--tools/h5ls/CMakeLists.txt1
-rw-r--r--tools/h5repack/CMakeLists.txt1
-rw-r--r--tools/h5stat/CMakeLists.txt3
-rw-r--r--tools/lib/CMakeLists.txt1
-rw-r--r--tools/misc/CMakeLists.txt3
28 files changed, 147 insertions, 85 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 06bcc9d..140bac3 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -31,6 +31,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
EXPORT ${HDF5_EXPORTED_TARGETS}
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF5_PACKAGE}::
COMPONENT configinstall
)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -40,8 +41,9 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
export (
- TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
+ TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF5_PACKAGE}::
)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a725bd..2cdee64 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -371,6 +371,8 @@ endif (NOT HDF5_EXPORTED_TARGETS)
# which include hdf5 as a sub-project within their build tree
#-----------------------------------------------------------------------------
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "")
+set_global_variable (HDF5_UTILS_TO_EXPORT "")
+
set (EXTERNAL_HEADER_LIST "")
set (EXTERNAL_LIBRARY_LIST "")
set (EXTERNAL_LIBRARYDLL_LIST "")
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 1a182e3..0adbaa1 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -133,5 +133,6 @@ if (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT cpplibraries
+ INCLUDES DESTINATION include
)
endif (HDF5_EXPORTED_TARGETS)
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index b03f6d0..9bd9eb2 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -39,7 +39,7 @@ To test the installation with the examples;
The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
It can be changed with the INSTALLDIR script option.
The default ctest configuration is defined as "Release". It can be changed
- with the CTEST_BUILD_CONFIGURATION script option. Note that this must
+ with the CTEST_CONFIGURATION_TYPE script option. Note that this must
be the same as the value used with the -C command line option.
The default build configuration is defined to build and use static libraries.
Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index 52d6baf..3584315 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -144,12 +144,12 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
- set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp2}-${libtype} ${hdf5_comp}-${libtype})
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp2}-${libtype} @HDF5_PACKAGE@::${hdf5_comp}-${libtype})
endif ()
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
- set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp}-${libtype})
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp}-${libtype})
endif ()
endif ()
endforeach ()
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 3b665f2..991614a 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -69,7 +69,7 @@ set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FO
set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
-set (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE)
+set (CTEST_CONFIGURATION_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index abe252e..a056cfb 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -213,7 +213,7 @@ foreach(v
CTEST_SOURCE_DIRECTORY
CTEST_BINARY_DIRECTORY
CTEST_CMAKE_GENERATOR
- CTEST_BUILD_CONFIGURATION
+ CTEST_CONFIGURATION_TYPE
CTEST_GIT_COMMAND
CTEST_CHECKOUT_COMMAND
CTEST_CONFIGURE_COMMAND
@@ -239,12 +239,18 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
endif()
configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
- ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
+ ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+ if(${res} LESS 0 OR ${res} GREATER 0)
+ message(FATAL_ERROR "Failed configure: ${res}\n")
+ endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Update Configure Notes)
endif()
- ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+ if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ message(FATAL_ERROR "Failed build: ${res} with Errors=${errval}\n")
+ endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
@@ -255,7 +261,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
if(LOCAL_SUBMIT)
ctest_submit (PARTS Test)
endif()
- if(res GREATER 0)
+ if(${res} LESS 0 OR ${res} GREATER 0)
message(FATAL_ERROR "Failed tests: ${res}\n")
endif()
else()
@@ -276,7 +282,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
##-----------------------------------------------
## Package the product
##-----------------------------------------------
- execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
+ execute_process(COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULT_VARIABLE cpackResult
OUTPUT_VARIABLE cpackLog
diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake
index 1c9a2e3..1a02f82 100644
--- a/config/cmake_ext_mod/FindMPI.cmake
+++ b/config/cmake_ext_mod/FindMPI.cmake
@@ -1,3 +1,5 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See https://cmake.org/licensing for details.
+
#.rst:
# FindMPI
# -------
@@ -11,7 +13,8 @@
# of them have somewhat different include paths, libraries to link
# against, etc., and this module tries to smooth out those differences.
#
-# === Variables ===
+# Variables
+# ^^^^^^^^^
#
# This module will set the following variables per language in your
# project, where <lang> is one of C, CXX, or Fortran:
@@ -37,11 +40,12 @@
# before the executable to run.
# MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after other flags
#
-# === Usage ===
+# Usage
+# ^^^^^
#
# To use this module, simply call FindMPI from a CMakeLists.txt file, or
-# run find_package(MPI), then run CMake. If you are happy with the
-# auto- detected configuration for your language, then you're done. If
+# run ``find_package(MPI)``, then run CMake. If you are happy with the
+# auto-detected configuration for your language, then you're done. If
# not, you have two options:
#
# ::
@@ -55,24 +59,25 @@
# listed above, but these two are required. This will circumvent
# autodetection entirely.
#
-# When configuration is successful, MPI_<lang>_COMPILER will be set to
-# the compiler wrapper for <lang>, if it was found. MPI_<lang>_FOUND
+# When configuration is successful, ``MPI_<lang>_COMPILER`` will be set to
+# the compiler wrapper for <lang>, if it was found. ``MPI_<lang>_FOUND``
# and other variables above will be set if any MPI implementation was
# found for <lang>, regardless of whether a compiler was found.
#
-# When using MPIEXEC to execute MPI applications, you should typically
-# use all of the MPIEXEC flags as follows:
+# When using ``MPIEXEC`` to execute MPI applications, you should typically
+# use all of the ``MPIEXEC`` flags as follows:
#
# ::
#
# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS
# ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS
#
-# where PROCS is the number of processors on which to execute the
-# program, EXECUTABLE is the MPI program, and ARGS are the arguments to
+# where ``PROCS`` is the number of processors on which to execute the
+# program, ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to
# pass to the MPI program.
#
-# === Backward Compatibility ===
+# Backward Compatibility
+# ^^^^^^^^^^^^^^^^^^^^^^
#
# For backward compatibility with older versions of FindMPI, these
# variables are set, but deprecated:
@@ -83,22 +88,7 @@
# MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_EXTRA_LIBRARY
# MPI_LINK_FLAGS MPI_LIBRARIES
#
-# In new projects, please use the MPI_<lang>_XXX equivalents.
-
-#=============================================================================
-# Copyright 2001-2011 Kitware, Inc.
-# Copyright 2010-2011 Todd Gamblin tgamblin@llnl.gov
-# Copyright 2001-2009 Dave Partyka
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
+# In new projects, please use the ``MPI_<lang>_XXX`` equivalents.
# include this to handle the QUIETLY and REQUIRED arguments
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
@@ -204,7 +194,7 @@ function (_mpi_check_compiler compiler options cmdvar resvar)
# Intel MPI 5.0.1 will return a zero return code even when the
# argument to the MPI compiler wrapper is unknown. Attempt to
# catch this case.
- if("${cmdline}" MATCHES "undefined reference")
+ if(cmdline MATCHES "undefined reference" OR cmdline MATCHES "unrecognized")
set(success 255 )
endif()
set(${cmdvar} "${cmdline}" PARENT_SCOPE)
@@ -325,7 +315,7 @@ function (interrogate_mpi_compiler lang try_libs)
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
if (MPI_COMPILE_FLAGS_WORK)
- set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
+ string(APPEND MPI_COMPILE_FLAGS_WORK " ${FLAG}")
else()
set(MPI_COMPILE_FLAGS_WORK ${FLAG})
endif()
@@ -355,10 +345,10 @@ function (interrogate_mpi_compiler lang try_libs)
endif()
# Extract linker paths from the link command line
- string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
+ string(REGEX MATCHALL "(^| |-Wl,)(-L|/LIBPATH:)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
set(MPI_LINK_PATH)
foreach(LPATH ${MPI_ALL_LINK_PATHS})
- string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
+ string(REGEX REPLACE "^(| |-Wl,)(-L|/LIBPATH:)" "" LPATH ${LPATH})
string(REPLACE "//" "/" LPATH ${LPATH})
list(APPEND MPI_LINK_PATH ${LPATH})
endforeach()
@@ -374,7 +364,7 @@ function (interrogate_mpi_compiler lang try_libs)
set(MPI_LINK_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_LINK_FLAGS})
if (MPI_LINK_FLAGS_WORK)
- set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}")
+ string(APPEND MPI_LINK_FLAGS_WORK " ${FLAG}")
else()
set(MPI_LINK_FLAGS_WORK ${FLAG})
endif()
@@ -383,20 +373,31 @@ function (interrogate_mpi_compiler lang try_libs)
# Extract the set of libraries to link against from the link command
# line
string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
+ if(WIN32)
+ # The intel wrappers on windows link against static versions of the MPI libraries.
+ # The static libraries are simply listed on the command line without -l.
+ # For instance: " icl ... impi.lib "
+ string(REGEX MATCHALL "(^| )([^\" ]+)\\.lib" tmp "${MPI_LINK_CMDLINE}")
+ list(APPEND MPI_LIBNAMES ${tmp})
+ endif()
# add the compiler implicit directories because some compilers
# such as the intel compiler have libraries that show up
# in the showme list that can only be found in the implicit
# link directories of the compiler.
if (DEFINED CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES)
- set(MPI_LINK_PATH
- "${MPI_LINK_PATH};${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}")
+ string(APPEND MPI_LINK_PATH
+ ";${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}")
endif ()
# Determine full path names for all of the libraries that one needs
# to link against in an MPI program
foreach(LIB ${MPI_LIBNAMES})
string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
+ if(WIN32)
+ string(REGEX REPLACE "\\.lib$" "" LIB ${LIB})
+ endif()
+ string(STRIP ${LIB} LIB)
# MPI_LIB is cached by find_library, but we don't want that. Clear it first.
set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
find_library(MPI_LIB NAMES ${LIB} HINTS ${MPI_LINK_PATH})
@@ -597,14 +598,13 @@ foreach (lang C CXX Fortran)
if (CMAKE_${lang}_COMPILER_WORKS)
# If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler.
if (MPI_${lang}_COMPILER)
- is_file_executable(MPI_${lang}_COMPILER MPI_COMPILER_IS_EXECUTABLE)
- if (NOT MPI_COMPILER_IS_EXECUTABLE)
+ if (NOT IS_ABSOLUTE "${MPI_${lang}_COMPILER}")
# Get rid of our default list of names and just search for the name the user wants.
set(_MPI_${lang}_COMPILER_NAMES ${MPI_${lang}_COMPILER})
set(MPI_${lang}_COMPILER "MPI_${lang}_COMPILER-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- # If the user specifies a compiler, we don't want to try to search libraries either.
- set(try_libs FALSE)
endif()
+ # If the user specifies a compiler, we don't want to try to search libraries either.
+ set(try_libs FALSE)
else()
set(try_libs TRUE)
endif()
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index c62bb37..c3ae5c4 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -116,6 +116,7 @@ add_custom_command (
)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
if (WIN32)
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
else (WIN32)
@@ -432,7 +433,6 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
)
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
-
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
@@ -451,5 +451,6 @@ if (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT fortlibraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT fortlibraries
+ INCLUDES DESTINATION include
)
endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 8740737..a8d7152 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -73,5 +73,6 @@ if (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlcpplibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hlcpplibraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT hlcpplibraries
+ INCLUDES DESTINATION include
)
endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 5512261..95990cc 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.1.0)
PROJECT(HDF5_HL_F90_SRC C CXX Fortran)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")
if (WIN32)
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
else (WIN32)
@@ -13,6 +14,7 @@ if (WIN32)
else (WIN32)
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
endif (WIN32)
+
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
@@ -176,5 +178,6 @@ if (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hlfortlibraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT hlfortlibraries
+ INCLUDES DESTINATION include
)
endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 9673050..1e91a47 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -1,7 +1,6 @@
cmake_minimum_required (VERSION 3.1.0)
PROJECT (HDF5_HL_SRC)
-
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
@@ -82,5 +81,6 @@ if (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hllibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hllibraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT hllibraries
+ INCLUDES DESTINATION include
)
endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 3a55501..57daadb 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -22,6 +22,7 @@ TARGET_NAMING (gif2h5 STATIC)
TARGET_C_PROPERTIES (gif2h5 STATIC " " " ")
target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5")
#-- Add h52gif program
set (hdf2gif_SOURCES
@@ -33,6 +34,7 @@ TARGET_NAMING (h52gif STATIC)
TARGET_C_PROPERTIES (h52gif STATIC " " " ")
target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif")
if (BUILD_TESTING)
# --------------------------------------------------------------------
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index d088432..4b8059d 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -106,7 +106,7 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
The -S option uses the script version of ctest.
The value for the -C option (as shown above, "-C Release") must
- match the setting for CTEST_BUILD_CONFIGURATION in the platform
+ match the setting for CTEST_CONFIGURATION_TYPE in the platform
configuration file.
The -VV option is for most verbose; use -V for less verbose.
@@ -380,8 +380,8 @@ These five steps are described in detail below.
* Visual Studio 12 2013 Win64
* Visual Studio 11 2012
* Visual Studio 11 2012 Win64
- * Visual Studio 10 2010
- * Visual Studio 10 2010 Win64
+ * Visual Studio 14 2015
+ * Visual Studio 14 2015 Win64
<options> is:
* SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
@@ -589,14 +589,18 @@ HDF5_ENABLE_TRACE "Enable API tracing capability"
HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF
HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF
HDF5_NO_PACKAGES "Do not include CPack Packaging" OFF
+HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF
+HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF
HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF
HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
+HDF_TEST_EXPRESS "Control testing framework (0-3)" "0"
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
+SKIP_HDF5_FORTRAN_SHARED "Do not build the fortran shared libraries" OFF
if (APPLE)
HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
if (CMAKE_BUILD_TYPE MATCHES Debug)
@@ -665,7 +669,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# VS201264 * Visual Studio 11 2012 Win64
#
# INSTALLDIR - root folder where hdf5 is installed
-# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
+# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
# CTEST_SOURCE_NAME - source folder
# STATIC_LIBRARIES - Build/use static libraries
# FORTRAN_LIBRARIES - Build/use fortran libraries
@@ -679,7 +683,7 @@ set(CTEST_SOURCE_VERSEXT "")
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.8 root folder
-#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
@@ -698,7 +702,7 @@ endif()
# build generator must be defined
if(NOT DEFINED BUILD_GENERATOR)
- message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2013, VS201364, VS2012, or VS201264")
+ message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
else()
if(${BUILD_GENERATOR} STREQUAL "Unix")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
@@ -715,7 +719,7 @@ else()
elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
else()
- message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2013, VS201364, VS2012, or VS201264")
+ message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
endif()
endif()
@@ -726,17 +730,21 @@ if(NOT DEFINED INSTALLDIR)
set(INSTALLDIR "/usr/local/myhdf5")
endif()
endif()
-if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
- set(CTEST_BUILD_CONFIGURATION "Release")
+if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ set(CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
endif()
if(NOT DEFINED STATIC_LIBRARIES)
set(STATICLIBRARIES "YES")
+else()
+ set(STATICLIBRARIES "NO")
endif()
if(NOT DEFINED FORTRAN_LIBRARIES)
set(FORTRANLIBRARIES "NO")
+else()
+ set(FORTRANLIBRARIES "YES")
endif()
set(CTEST_BINARY_NAME "build")
@@ -754,7 +762,15 @@ endif()
if(WIN32)
set(SITE_OS_NAME "Windows")
set(SITE_OS_VERSION "WIN7")
- if(${BUILD_GENERATOR} STREQUAL "VS201364")
+ if(${BUILD_GENERATOR} STREQUAL "VS201564")
+ set(SITE_OS_BITS "64")
+ set(SITE_COMPILER_NAME "vs2015")
+ set(SITE_COMPILER_VERSION "14")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
+ set(SITE_OS_BITS "32")
+ set(SITE_COMPILER_NAME "vs2015")
+ set(SITE_COMPILER_VERSION "14")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
set(SITE_OS_BITS "64")
set(SITE_COMPILER_NAME "vs2013")
set(SITE_COMPILER_VERSION "12")
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index ddbd169..bddcfd7 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -57,6 +57,12 @@ New Features
Configuration
-------------
+ - CMake
+ Added NAMESPACE hdf5:: to package configuration files
+ - CMake: change CTEST_BUILD_CONFIGURATION to CTEST_CONFIGURATION_TYPE, which is
+ recommended by CMake documentation.
+ HDFFV-9971 (ADB 2016/8/22)
+ - CMake minimum is now 3.1.0. (ADB 2015/11/14)
- Cmakehdf5: added ability to run multiple make commands.
Added option --njobs to specific up to homw many jobs to launch during
build (cmamke) and testing (ctest).
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index ae46877..da61fed 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -49,7 +49,7 @@ Default installation process:
The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
It can be changed with the INSTALLDIR script option.
The default ctest configuration is defined as "Release". It can be changed
- with the CTEST_BUILD_CONFIGURATION script option. Note that this must
+ with the CTEST_CONFIGURATION_TYPE script option. Note that this must
be the same as the value used with the -C command line option.
The default build configuration is defined to build and use static libraries.
Shared libraries can be used with the STATIC_LIBRARIES script option set to "NO".
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 7c4a36f..bcff184 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -103,8 +103,8 @@ These steps are described in more detail below.
* Visual Studio 12 2013 Win64
* Visual Studio 11 2012
* Visual Studio 11 2012 Win64
- * Visual Studio 10 2010
- * Visual Studio 10 2010 Win64
+ * Visual Studio 14 2015
+ * Visual Studio 14 2015 Win64
<options> is:
* BUILD_TESTING:BOOL=ON
@@ -132,7 +132,7 @@ These steps are described in more detail below.
2.2 Alternative command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
- cmake -G "Visual Studio 11" -DBUILD_TESTING:BOOL=ON ..
+ cmake -G "Visual Studio 12 2013" -DBUILD_TESTING:BOOL=ON ..
3. Build HDF5 Applications
@@ -183,15 +183,19 @@ source root. Include the following text in the file:
cmake_minimum_required (VERSION 3.1.0)
project (HDF5MyApp C CXX)
-find_package (HDF5 NAMES hdf5 COMPONENTS C static)
+set (LIB_TYPE STATIC) # or SHARED
+string(TOLOWER ${LIB_TYPE} SEARCH_TYPE)
+
+find_package (HDF5 NAMES hdf5 COMPONENTS C ${SEARCH_TYPE})
# find_package (HDF5) # Find non-cmake built HDF5
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
-set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY})
+set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_${LIB_TYPE}_LIBRARY})
set (example hdf_example)
add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
-TARGET_C_PROPERTIES (${example} " " " ")
+TARGET_NAMING (${example} ${LIB_TYPE})
+TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ")
target_link_libraries (${example} ${LINK_LIBS})
enable_testing ()
@@ -247,7 +251,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.8 root folder
-#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
@@ -290,23 +294,23 @@ set(CTEST_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
if(NOT DEFINED INSTALLDIR)
- if(WIN32)
- set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
- else()
- set(INSTALLDIR "/usr/local/myhdf5")
- endif()
+ set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
endif()
-if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
- set(CTEST_BUILD_CONFIGURATION "Release")
+if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ set(CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "HDF5Examples")
endif()
if(NOT DEFINED STATIC_LIBRARIES)
set(STATICLIBRARIES "YES")
+else(NOT DEFINED STATIC_LIBRARIES)
+ set(STATICLIBRARIES "NO")
endif()
if(NOT DEFINED FORTRAN_LIBRARIES)
set(FORTRANLIBRARIES "NO")
+else(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "YES")
endif()
#TAR_SOURCE - name of tarfile
@@ -336,9 +340,9 @@ else(WIN32)
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
endif(WIN32)
if(${FORTRANLIBRARIES})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
else()
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
endif()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
@@ -406,7 +410,7 @@ if(NOT N EQUAL 0)
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
#-----------------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9fcb28d..75754fe 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -707,7 +707,7 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF)
+option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
if (HDF5_ENABLE_DEBUG_APIS)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
COMPILE_DEFINITIONS
@@ -739,6 +739,7 @@ if (BUILD_SHARED_LIBS)
APPEND PROPERTY COMPILE_DEFINITIONS
"H5_HAVE_THREADSAFE"
)
+ target_link_libraries (${HDF5_LIBSH_TARGET} Threads::Threads)
endif (HDF5_ENABLE_THREADSAFE)
if (HDF5_ENABLE_DEBUG_APIS)
@@ -781,5 +782,6 @@ if (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT libraries
+ INCLUDES DESTINATION include
)
endif (HDF5_EXPORTED_TARGETS)
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 63b9b5d..54eeacb 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -14,6 +14,7 @@ TARGET_NAMING (h5copy STATIC)
TARGET_C_PROPERTIES (h5copy STATIC " " " ")
target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5copy PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5copy")
set (H5_DEP_EXECUTABLES h5copy)
@@ -42,7 +43,7 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
+
install (
TARGETS
h5copy
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index 59a3241..1014b32 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -17,6 +17,7 @@ TARGET_NAMING (h5diff STATIC)
TARGET_C_PROPERTIES (h5diff STATIC " " " ")
target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5diff PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5diff")
set (H5_DEP_EXECUTABLES h5diff)
@@ -29,6 +30,7 @@ if (H5_HAVE_PARALLEL)
TARGET_C_PROPERTIES (ph5diff STATIC " " " ")
target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (ph5diff PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff")
endif (H5_HAVE_PARALLEL)
if (BUILD_TESTING)
@@ -41,12 +43,12 @@ if (BUILD_TESTING)
TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ")
target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET})
set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
-
+
#add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
endif (HDF5_BUILD_GENERATORS)
include (CMakeTests.cmake)
-
+
endif (BUILD_TESTING)
##############################################################################
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 47ba7a8..ba73475 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -18,6 +18,7 @@ TARGET_NAMING (h5dump STATIC)
TARGET_C_PROPERTIES (h5dump STATIC " " " ")
target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dump PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump")
set (H5_DEP_EXECUTABLES h5dump)
@@ -31,7 +32,7 @@ if (BUILD_TESTING)
TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ")
target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
-
+
#add_test (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
endif (HDF5_BUILD_GENERATORS)
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index b885a76..1d2d19c 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -15,6 +15,7 @@ TARGET_C_PROPERTIES (h5import STATIC " " " ")
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)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5import")
set (H5_DEP_EXECUTABLES h5import)
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index c01f8f7..d6a2e70 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -14,24 +14,28 @@ TARGET_NAMING (h5jam STATIC)
TARGET_C_PROPERTIES (h5jam STATIC " " " ")
target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5jam PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5jam")
add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
TARGET_NAMING (getub STATIC)
TARGET_C_PROPERTIES (getub STATIC " " " ")
target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (getub PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5getub")
add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
TARGET_NAMING (tellub STATIC)
TARGET_C_PROPERTIES (tellub STATIC " " " ")
target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (tellub PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5tellub")
add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
TARGET_NAMING (h5unjam STATIC)
TARGET_C_PROPERTIES (h5unjam STATIC " " " ")
target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5unjam PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5unjam")
set (H5_DEP_EXECUTABLES
h5jam
@@ -50,7 +54,7 @@ if (BUILD_TESTING)
TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET})
set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
-
+
#add_test (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
endif (HDF5_BUILD_GENERATORS)
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 4e96db2..3abc13c 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -14,6 +14,7 @@ TARGET_NAMING (h5ls STATIC)
TARGET_C_PROPERTIES (h5ls STATIC " " " ")
target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5ls PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5lsy")
set (H5_DEP_EXECUTABLES
h5ls
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index bfc1713..9ceb097 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -25,6 +25,7 @@ TARGET_NAMING (h5repack STATIC)
TARGET_C_PROPERTIES (h5repack STATIC " " " ")
target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5repack PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack")
set (H5_DEP_EXECUTABLES h5repack)
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 71c4741..5f618a3 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -14,6 +14,7 @@ TARGET_NAMING (h5stat STATIC)
TARGET_C_PROPERTIES (h5stat STATIC " " " ")
target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5stat PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat")
set (H5_DEP_EXECUTABLES h5stat)
@@ -27,7 +28,7 @@ if (BUILD_TESTING)
TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ")
target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET})
set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
-
+
#add_test (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
endif (HDF5_BUILD_GENERATORS)
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index ce1ad34..d04d099 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -100,5 +100,6 @@ if (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolslibraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT toolslibraries
+ INCLUDES DESTINATION include
)
endif (HDF5_EXPORTED_TARGETS)
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index d53cdc8..9da2e47 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -15,18 +15,21 @@ TARGET_NAMING (h5debug STATIC)
TARGET_C_PROPERTIES (h5debug STATIC " " " ")
target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5debug PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5debug")
add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c)
TARGET_NAMING (h5repart STATIC)
TARGET_C_PROPERTIES (h5repart STATIC " " " ")
target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5repart PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repart")
add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c)
TARGET_NAMING (h5mkgrp STATIC)
TARGET_C_PROPERTIES (h5mkgrp STATIC " " " ")
target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5mkgrp PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5mkgrp")
set (H5_DEP_EXECUTABLES
h5debug