summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2014-11-19 00:29:26 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2014-11-19 00:29:26 (GMT)
commita00ad64f468e8ea4d19c17675258694a06febe32 (patch)
treee9213dd225503dc1806dc4b326b565567f9671ef /config
parent5a3e6cf0800219816b018baf50b7133baa73bc68 (diff)
downloadhdf5-a00ad64f468e8ea4d19c17675258694a06febe32.zip
hdf5-a00ad64f468e8ea4d19c17675258694a06febe32.tar.gz
hdf5-a00ad64f468e8ea4d19c17675258694a06febe32.tar.bz2
[svn-r25825] Bring revisions #25509 - #25762 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'config')
-rw-r--r--config/apple24
-rw-r--r--config/cmake/CMakePackageConfigHelpers.cmake321
-rw-r--r--config/cmake/ConfigureChecks.cmake2
-rw-r--r--config/cmake/cacheinit.cmake4
-rw-r--r--config/cmake/hdf5-config-version.cmake.in56
-rw-r--r--config/cmake/hdf5-config.cmake.build.in73
-rw-r--r--config/cmake/hdf5-config.cmake.in (renamed from config/cmake/hdf5-config.cmake.install.in)39
-rw-r--r--config/cmake/mccacheinit.cmake4
-rw-r--r--config/gnu-flags2
-rw-r--r--config/lt_vers.am4
10 files changed, 410 insertions, 119 deletions
diff --git a/config/apple b/config/apple
index ac93ea5..5203695 100644
--- a/config/apple
+++ b/config/apple
@@ -31,6 +31,20 @@ if test "X-" = "X-$CC"; then
*)
CC=clang
CC_BASENAME=clang
+
+ # Production
+ PROD_CFLAGS="-O3"
+ PROD_CPPFLAGS=
+
+ # Debug
+ DEBUG_CFLAGS="-g -O0"
+ DEBUG_CPPFLAGS=
+
+ # Profile
+ # Use this for profiling with gprof
+ # Just "-g" for now. More later.
+ PROFILE_CFLAGS="-g"
+ PROFILE_CPPFLAGS=
;;
esac
fi
@@ -89,6 +103,16 @@ if test "X-" = "X-$CXX"; then
esac
fi
+case $CXX_BASENAME in
+ clang++)
+ PROD_CXXFLAGS="-O3"
+ DEBUG_CXXFLAGS="-g -O0"
+ # Use this for profiling with gprof
+ # Just "-g" for now. More later.
+ PROFILE_CXXFLAGS="-g"
+ ;;
+esac
+
# compiler version strings
case $CC in
clang)
diff --git a/config/cmake/CMakePackageConfigHelpers.cmake b/config/cmake/CMakePackageConfigHelpers.cmake
new file mode 100644
index 0000000..c6dc141
--- /dev/null
+++ b/config/cmake/CMakePackageConfigHelpers.cmake
@@ -0,0 +1,321 @@
+#.rst:
+# CMakePackageConfigHelpers
+# -------------------------
+#
+# Helpers functions for creating config files that can be included by other
+# projects to find and use a package.
+#
+# Adds the :command:`configure_package_config_file()` and
+# :command:`write_basic_package_version_file()` commands.
+#
+# Generating a Package Configuration File
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#
+# .. command:: configure_package_config_file
+#
+# Create a config file for a project::
+#
+# configure_package_config_file(<input> <output> INSTALL_DESTINATION <path>
+# [PATH_VARS <var1> <var2> ... <varN>]
+# [NO_SET_AND_CHECK_MACRO]
+# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]
+# [INSTALL_PREFIX <path>])
+#
+#
+# ``configure_package_config_file()`` should be used instead of the plain
+# :command:`configure_file()` command when creating the ``<Name>Config.cmake``
+# or ``<Name>-config.cmake`` file for installing a project or library. It helps
+# making the resulting package relocatable by avoiding hardcoded paths in the
+# installed ``Config.cmake`` file.
+#
+# In a ``FooConfig.cmake`` file there may be code like this to make the install
+# destinations know to the using project:
+#
+# .. code-block:: cmake
+#
+# set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" )
+# set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" )
+# set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" )
+# ...logic to determine installedPrefix from the own location...
+# set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" )
+#
+# All 4 options shown above are not sufficient, since the first 3 hardcode the
+# absolute directory locations, and the 4th case works only if the logic to
+# determine the ``installedPrefix`` is correct, and if ``CONFIG_INSTALL_DIR``
+# contains a relative path, which in general cannot be guaranteed. This has the
+# effect that the resulting ``FooConfig.cmake`` file would work poorly under
+# Windows and OSX, where users are used to choose the install location of a
+# binary package at install time, independent from how
+# :variable:`CMAKE_INSTALL_PREFIX` was set at build/cmake time.
+#
+# Using ``configure_package_config_file`` helps. If used correctly, it makes
+# the resulting ``FooConfig.cmake`` file relocatable. Usage:
+#
+# 1. write a ``FooConfig.cmake.in`` file as you are used to
+# 2. insert a line containing only the string ``@PACKAGE_INIT@``
+# 3. instead of ``set(FOO_DIR "@SOME_INSTALL_DIR@")``, use
+# ``set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")`` (this must be after the
+# ``@PACKAGE_INIT@`` line)
+# 4. instead of using the normal :command:`configure_file()`, use
+# ``configure_package_config_file()``
+#
+#
+#
+# The ``<input>`` and ``<output>`` arguments are the input and output file, the
+# same way as in :command:`configure_file()`.
+#
+# The ``<path>`` given to ``INSTALL_DESTINATION`` must be the destination where
+# the ``FooConfig.cmake`` file will be installed to. This path can either be
+# absolute, or relative to the ``INSTALL_PREFIX`` path.
+#
+# The variables ``<var1>`` to ``<varN>`` given as ``PATH_VARS`` are the
+# variables which contain install destinations. For each of them the macro will
+# create a helper variable ``PACKAGE_<var...>``. These helper variables must be
+# used in the ``FooConfig.cmake.in`` file for setting the installed location.
+# They are calculated by ``configure_package_config_file`` so that they are
+# always relative to the installed location of the package. This works both for
+# relative and also for absolute locations. For absolute locations it works
+# only if the absolute location is a subdirectory of ``INSTALL_PREFIX``.
+#
+# If the ``INSTALL_PREFIX`` argument is passed, this is used as base path to
+# calculate all the relative paths. The ``<path>`` argument must be an absolute
+# path. If this argument is not passed, the :variable:`CMAKE_INSTALL_PREFIX`
+# variable will be used instead. The default value is good when generating a
+# FooConfig.cmake file to use your package from the install tree. When
+# generating a FooConfig.cmake file to use your package from the build tree this
+# option should be used.
+#
+# By default ``configure_package_config_file`` also generates two helper macros,
+# ``set_and_check()`` and ``check_required_components()`` into the
+# ``FooConfig.cmake`` file.
+#
+# ``set_and_check()`` should be used instead of the normal ``set()`` command for
+# setting directories and file locations. Additionally to setting the variable
+# it also checks that the referenced file or directory actually exists and fails
+# with a ``FATAL_ERROR`` otherwise. This makes sure that the created
+# ``FooConfig.cmake`` file does not contain wrong references.
+# When using the ``NO_SET_AND_CHECK_MACRO``, this macro is not generated
+# into the ``FooConfig.cmake`` file.
+#
+# ``check_required_components(<package_name>)`` should be called at the end of
+# the ``FooConfig.cmake`` file if the package supports components. This macro
+# checks whether all requested, non-optional components have been found, and if
+# this is not the case, sets the ``Foo_FOUND`` variable to ``FALSE``, so that
+# the package is considered to be not found. It does that by testing the
+# ``Foo_<Component>_FOUND`` variables for all requested required components.
+# When using the ``NO_CHECK_REQUIRED_COMPONENTS_MACRO`` option, this macro is
+# not generated into the ``FooConfig.cmake`` file.
+#
+# For an example see below the documentation for
+# :command:`write_basic_package_version_file()`.
+#
+# Generating a Package Version File
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#
+# .. command:: write_basic_package_version_file
+#
+# Create a version file for a project::
+#
+# write_basic_package_version_file(<filename>
+# [VERSION <major.minor.patch>]
+# COMPATIBILITY <AnyNewerVersion|SameMajorVersion|ExactVersion> )
+#
+#
+# Writes a file for use as ``<package>ConfigVersion.cmake`` file to
+# ``<filename>``. See the documentation of :command:`find_package()` for
+# details on this.
+#
+# ``<filename>`` is the output filename, it should be in the build tree.
+# ``<major.minor.patch>`` is the version number of the project to be installed.
+#
+# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable is used.
+# If this hasn't been set, it errors out.
+#
+# The ``COMPATIBILITY`` mode ``AnyNewerVersion`` means that the installed
+# package version will be considered compatible if it is newer or exactly the
+# same as the requested version. This mode should be used for packages which
+# are fully backward compatible, also across major versions.
+# If ``SameMajorVersion`` is used instead, then the behaviour differs from
+# ``AnyNewerVersion`` in that the major version number must be the same as
+# requested, e.g. version 2.0 will not be considered compatible if 1.0 is
+# requested. This mode should be used for packages which guarantee backward
+# compatibility within the same major version.
+# If ``ExactVersion`` is used, then the package is only considered compatible if
+# the requested version matches exactly its own version number (not considering
+# the tweak version). For example, version 1.2.3 of a package is only
+# considered compatible to requested version 1.2.3. This mode is for packages
+# without compatibility guarantees.
+# If your project has more elaborated version matching rules, you will need to
+# write your own custom ``ConfigVersion.cmake`` file instead of using this
+# macro.
+#
+# Internally, this macro executes :command:`configure_file()` to create the
+# resulting version file. Depending on the ``COMPATIBLITY``, either the file
+# ``BasicConfigVersion-SameMajorVersion.cmake.in`` or
+# ``BasicConfigVersion-AnyNewerVersion.cmake.in`` is used. Please note that
+# these two files are internal to CMake and you should not call
+# :command:`configure_file()` on them yourself, but they can be used as starting
+# point to create more sophisticted custom ``ConfigVersion.cmake`` files.
+#
+# Example Generating Package Files
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#
+# Example using both :command:`configure_package_config_file` and
+# ``write_basic_package_version_file()``:
+#
+# ``CMakeLists.txt``:
+#
+# .. code-block:: cmake
+#
+# set(INCLUDE_INSTALL_DIR include/ ... CACHE )
+# set(LIB_INSTALL_DIR lib/ ... CACHE )
+# set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE )
+# ...
+# include(CMakePackageConfigHelpers)
+# configure_package_config_file(FooConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
+# INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake
+# PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR)
+# write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
+# VERSION 1.2.3
+# COMPATIBILITY SameMajorVersion )
+# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
+# DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake )
+#
+# ``FooConfig.cmake.in``:
+#
+# .. code-block:: cmake
+#
+# set(FOO_VERSION x.y.z)
+# ...
+# @PACKAGE_INIT@
+# ...
+# set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
+# set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@")
+#
+# check_required_components(Foo)
+
+
+#=============================================================================
+# Copyright 2012 Alexander Neundorf <neundorf@kde.org>
+#
+# 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.)
+
+include(CMakeParseArguments)
+
+include(WriteBasicConfigVersionFile)
+
+macro(WRITE_BASIC_PACKAGE_VERSION_FILE)
+ write_basic_config_version_file(${ARGN})
+endmacro()
+
+function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
+ set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+ set(oneValueArgs INSTALL_DESTINATION INSTALL_PREFIX)
+ set(multiValueArgs PATH_VARS )
+
+ cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ if(CCF_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown keywords given to CONFIGURE_PACKAGE_CONFIG_FILE(): \"${CCF_UNPARSED_ARGUMENTS}\"")
+ endif()
+
+ if(NOT CCF_INSTALL_DESTINATION)
+ message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()")
+ endif()
+
+ if(DEFINED CCF_INSTALL_PREFIX)
+ if(IS_ABSOLUTE "${CCF_INSTALL_PREFIX}")
+ set(installPrefix "${CCF_INSTALL_PREFIX}")
+ else()
+ message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path")
+ endif()
+ else()
+ set(installPrefix "${CMAKE_INSTALL_PREFIX}")
+ endif()
+
+ if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}")
+ set(absInstallDir "${CCF_INSTALL_DESTINATION}")
+ else()
+ set(absInstallDir "${installPrefix}/${CCF_INSTALL_DESTINATION}")
+ endif()
+
+ file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${installPrefix}" )
+
+ foreach(var ${CCF_PATH_VARS})
+ if(NOT DEFINED ${var})
+ message(FATAL_ERROR "Variable ${var} does not exist")
+ else()
+ if(IS_ABSOLUTE "${${var}}")
+ string(REPLACE "${installPrefix}" "\${PACKAGE_PREFIX_DIR}"
+ PACKAGE_${var} "${${var}}")
+ else()
+ set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
+ endif()
+ endif()
+ endforeach()
+
+ get_filename_component(inputFileName "${_inputFile}" NAME)
+
+ set(PACKAGE_INIT "
+####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
+####### Any changes to this file will be overwritten by the next CMake run ####
+####### The input file was ${inputFileName} ########
+
+get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
+")
+
+ if("${absInstallDir}" MATCHES "^(/usr)?/lib(64)?/.+")
+ # Handle "/usr move" symlinks created by some Linux distros.
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+# Use original install prefix when loaded through a \"/usr move\"
+# cross-prefix symbolic link such as /lib -> /usr/lib.
+get_filename_component(_realCurr \"\${CMAKE_CURRENT_LIST_DIR}\" REALPATH)
+get_filename_component(_realOrig \"${absInstallDir}\" REALPATH)
+if(_realCurr STREQUAL _realOrig)
+ set(PACKAGE_PREFIX_DIR \"${installPrefix}\")
+endif()
+unset(_realOrig)
+unset(_realCurr)
+")
+ endif()
+
+ if(NOT CCF_NO_SET_AND_CHECK_MACRO)
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+macro(set_and_check _var _file)
+ set(\${_var} \"\${_file}\")
+ if(NOT EXISTS \"\${_file}\")
+ message(FATAL_ERROR \"File or directory \${_file} referenced by variable \${_var} does not exist !\")
+ endif()
+endmacro()
+")
+ endif()
+
+
+ if(NOT CCF_NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+macro(check_required_components _NAME)
+ foreach(comp \${\${_NAME}_FIND_COMPONENTS})
+ if(NOT \${_NAME}_\${comp}_FOUND)
+ if(\${_NAME}_FIND_REQUIRED_\${comp})
+ set(\${_NAME}_FOUND FALSE)
+ endif()
+ endif()
+ endforeach()
+endmacro()
+")
+ endif()
+
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+####################################################################################")
+
+ configure_file("${_inputFile}" "${_outputFile}" @ONLY)
+
+endfunction()
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 9330546..444ce0b 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -91,7 +91,7 @@ set (H5_DEFAULT_VFD H5FD_SEC2)
if (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
if (WINDOWS)
- set (H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin")
+ set (H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%\\\\hdf5\\\\lib\\\\plugin")
else (WINDOWS)
set (H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin")
endif (WINDOWS)
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index e8a5029..2c34e69 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -65,10 +65,6 @@ set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
-set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-
-set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in
index 148a659..5911fa7 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@)
-
- # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
- if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
-
- # compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
- set (PACKAGE_VERSION_COMPATIBLE 1)
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@")
- if ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
- set (PACKAGE_VERSION_EXACT 1)
-
- if ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @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@)
+ # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
+ if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@")
- endif ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
-endif ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
+ # compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
+ set (PACKAGE_VERSION_COMPATIBLE TRUE)
+
+ if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H5_VERS_RELEASE@")
+ set (PACKAGE_VERSION_EXACT TRUE)
+
+ if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H5_VERS_SUBRELEASE@")
+ # not using this yet
+ 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@")
+endif()
+# 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/config/cmake/hdf5-config.cmake.build.in b/config/cmake/hdf5-config.cmake.build.in
deleted file mode 100644
index 0276ea7..0000000
--- a/config/cmake/hdf5-config.cmake.build.in
+++ /dev/null
@@ -1,73 +0,0 @@
-#-----------------------------------------------------------------------------
-# HDF5 Config file for compiling against hdf5 build directory
-#-----------------------------------------------------------------------------
-GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-#-----------------------------------------------------------------------------
-# User Options
-#-----------------------------------------------------------------------------
-set (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
-set (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
-set (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
-set (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
-set (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
-set (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
-set (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
-set (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
-set (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
-set (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-
-#-----------------------------------------------------------------------------
-# Dependencies
-#-----------------------------------------------------------------------------
-IF(HDF5_ENABLE_PARALLEL)
- SET(HDF5_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
- SET(HDF5_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
-ENDIF(HDF5_ENABLE_PARALLEL)
-
-#-----------------------------------------------------------------------------
-# Directories
-#-----------------------------------------------------------------------------
-set (HDF5_INCLUDE_DIR "@HDF5_INCLUDES_BUILD_TIME@" "${HDF5_MPI_C_INCLUDE_PATH}" )
-
-if (HDF5_BUILD_FORTRAN)
- set (HDF5_INCLUDE_DIR_FORTRAN "@CMAKE_Fortran_MODULE_DIRECTORY@" )
-endif (HDF5_BUILD_FORTRAN)
-
-if (HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_CPP ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_CPP_LIB)
-
-if (HDF5_BUILD_HL_LIB)
- set (HDF5_INCLUDE_DIR_HL ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_HL_LIB)
-
-if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_HL_CPP ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
-
-if (HDF5_BUILD_TOOLS)
- set (HDF5_INCLUDE_DIR_TOOLS ${HDF5_INCLUDE_DIR} )
-endif (HDF5_BUILD_TOOLS)
-
-if (HDF5_BUILD_SHARED_LIBS)
- set (H5_BUILT_AS_DYNAMIC_LIB 1 )
-else (HDF5_BUILD_SHARED_LIBS)
- set (H5_BUILT_AS_STATIC_LIB 1 )
-endif (HDF5_BUILD_SHARED_LIBS)
-
-#-----------------------------------------------------------------------------
-# Version Strings
-#-----------------------------------------------------------------------------
-set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
-set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
-set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
-
-#-----------------------------------------------------------------------------
-# Don't include targets if this file is being picked up by another
-# project which has already build hdf5 as a subproject
-#-----------------------------------------------------------------------------
-if (NOT TARGET "@HDF5_PACKAGE@")
- include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
- set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
-endif (NOT TARGET "@HDF5_PACKAGE@")
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.in
index c275511..3e74aa7 100644
--- a/config/cmake/hdf5-config.cmake.install.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -1,12 +1,7 @@
#-----------------------------------------------------------------------------
-# HDF5 Config file for compiling against hdf5 install directory
+# HDF5 Config file for compiling against hdf5 build/install directory
#-----------------------------------------------------------------------------
-GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${SELF_DIR}" PATH)
-GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-if (NOT WIN32)
- GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-endif (NOT WIN32)
+@PACKAGE_INIT@
#-----------------------------------------------------------------------------
# User Options
@@ -34,29 +29,38 @@ ENDIF(HDF5_ENABLE_PARALLEL)
#-----------------------------------------------------------------------------
# Directories
#-----------------------------------------------------------------------------
-set (HDF5_INCLUDE_DIR "${_IMPORT_PREFIX}/include" "${HDF5_MPI_C_INCLUDE_PATH}" )
+set (HDF5_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" "${HDF5_MPI_C_INCLUDE_PATH}" )
+
+set (HDF5_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@")
+set_and_check (HDF5_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@")
if (HDF5_BUILD_FORTRAN)
- set (HDF5_INCLUDE_DIR_FORTRAN "${_IMPORT_PREFIX}/include/fortran" )
+ set (HDF5_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@" )
endif (HDF5_BUILD_FORTRAN)
if (HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_CPP "${_IMPORT_PREFIX}/include/cpp" )
+ set (HDF5_INCLUDE_DIR_CPP "@PACKAGE_INCLUDE_INSTALL_DIR@" )
endif (HDF5_BUILD_CPP_LIB)
if (HDF5_BUILD_HL_LIB)
- set (HDF5_INCLUDE_DIR_HL "${_IMPORT_PREFIX}/include/hl" )
+ set (HDF5_INCLUDE_DIR_HL "@PACKAGE_INCLUDE_INSTALL_DIR@" )
endif (HDF5_BUILD_HL_LIB)
if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_HL_CPP "${_IMPORT_PREFIX}/include/hl/cpp" )
+ set (HDF5_INCLUDE_DIR_HL_CPP "@PACKAGE_INCLUDE_INSTALL_DIR@" )
endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
if (HDF5_BUILD_TOOLS)
- set (HDF5_INCLUDE_DIR_TOOLS "${_IMPORT_PREFIX}/include" )
- set (HDF5_TOOLS_DIR "${_IMPORT_PREFIX}/bin" )
+ set (HDF5_INCLUDE_DIR_TOOLS "@PACKAGE_INCLUDE_INSTALL_DIR@" )
+ set_and_check (HDF5_TOOLS_DIR "@PACKAGE_CURRENT_BUILD_DIR@/bin" )
endif (HDF5_BUILD_TOOLS)
+if (HDF5_BUILD_SHARED_LIBS)
+ set (H5_BUILT_AS_DYNAMIC_LIB 1 )
+else (HDF5_BUILD_SHARED_LIBS)
+ set (H5_BUILT_AS_STATIC_LIB 1 )
+endif (HDF5_BUILD_SHARED_LIBS)
+
#-----------------------------------------------------------------------------
# Version Strings
#-----------------------------------------------------------------------------
@@ -70,12 +74,13 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
#-----------------------------------------------------------------------------
if (NOT TARGET "@HDF5_PACKAGE@")
if (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- include (${SELF_DIR}/../ZLIB/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ include (@PACKAGE_SHARE_INSTALL_DIR@/ZLIB/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
endif (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
if (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- include (${SELF_DIR}/../SZIP/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ include (@PACKAGE_SHARE_INSTALL_DIR@/SZIP/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
endif (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
endif (NOT TARGET "@HDF5_PACKAGE@")
+check_required_components(hdf5)
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 2913f32..a07e278 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -65,10 +65,6 @@ set (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
-set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-
-set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
diff --git a/config/gnu-flags b/config/gnu-flags
index 5f36eaa..6c33808 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -321,7 +321,7 @@ case "$cc_vendor-$cc_version" in
H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
# Append more extra warning flags that only gcc 4.5+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init"
# Append more extra warning flags that only gcc 4.6+ know about
H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
diff --git a/config/lt_vers.am b/config/lt_vers.am
index f237db3..76bd50a 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -16,8 +16,10 @@
##
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
+# After making changes, run bin/reconfigure to update other configure related
+# files like Makefile.in.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 182
+LT_VERS_REVISION = 193
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and