summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CTestConfig.cmake4
-rw-r--r--MANIFEST3
-rw-r--r--config/cmake/HDF518_Examples.cmake.in2
-rw-r--r--config/cmake/README.txt.cmake.in8
-rw-r--r--config/cmake/cacheinit.cmake6
-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.in87
-rw-r--r--config/cmake/hdf5-config.cmake.install.in81
-rw-r--r--fortran/test/CMakeLists.txt6
-rw-r--r--hl/fortran/src/CMakeLists.txt2
-rw-r--r--release_docs/INSTALL_CMake.txt8
-rw-r--r--src/CMakeLists.txt4
13 files changed, 147 insertions, 193 deletions
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index a14f686..a0e2a67 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -23,9 +23,9 @@ set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=
set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
-set (CTEST_TEST_TIMEOUT 3600 CACHE STRING
+set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
-set (DART_TESTING_TIMEOUT 3600 CACHE STRING
+set (DART_TESTING_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test." FORCE)
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
diff --git a/MANIFEST b/MANIFEST
index f1ce7ed..92e7793 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2251,8 +2251,7 @@
./config/cmake/FindHDF5.cmake.in
./config/cmake/H5cxx_config.h.in
./config/cmake/H5pubconf.h.in
-./config/cmake/hdf5-config.cmake.build.in
-./config/cmake/hdf5-config.cmake.install.in
+./config/cmake/hdf5-config.cmake.in
./config/cmake/hdf5-config-version.cmake.in
./config/cmake/HDF5Macros.cmake
./config/cmake/libhdf5.settings.cmake.in
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
index de74b99..c6d0b39 100644
--- a/config/cmake/HDF518_Examples.cmake.in
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
###############################################################################################################
# This script will build and run the examples from a compressed file
# Execute from a command line:
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index 4044ce5..79482bd 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -24,15 +24,15 @@ Installation
After Installation
===========================================================================
-The compressed examples file HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@, located in the
+The examples folder, HDF5Examples-0.1.1-Source, located in the
HDF5 install folder, can be built and tested with CMake and the supplied
HDF518_Examples.cmake file. The HDF518_Examples.cmake expects HDF5 to have
-been installed in the default location with above compilers. Also, CMake and 7Zip
-utilities should be installed.
+been installed in the default location with above compilers. Also, the CMake
+utility should be installed.
To test the installation with the examples;
Create a directory to run the examples.
- Copy HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@ to this directory, do NOT unzip.
+ Copy HDF5Examples-0.1.1-Source folder to this directory.
Copy HDF518_Examples.cmake to this directory.
Edit HDF518_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed.
(The default should be correct unless you installed into a different folder.)
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 5ec5568..a13ee9d 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -10,13 +10,9 @@ set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
-set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
-
-set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
-
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
-set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" 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.in b/config/cmake/hdf5-config.cmake.in
new file mode 100644
index 0000000..dda2668
--- /dev/null
+++ b/config/cmake/hdf5-config.cmake.in
@@ -0,0 +1,87 @@
+#-----------------------------------------------------------------------------
+# HDF5 Config file for compiling against hdf5 build/install directory
+#-----------------------------------------------------------------------------
+@PACKAGE_INIT@
+
+#-----------------------------------------------------------------------------
+# User Options
+#-----------------------------------------------------------------------------
+set (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
+set (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
+set (${HDF5_PACKAGE_NAME}_ENABLE_F2003 @HDF5_ENABLE_F2003@)
+set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
+set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
+set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+set (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
+set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
+set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
+set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
+set (${HDF5_PACKAGE_NAME}_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
+
+#-----------------------------------------------------------------------------
+# Dependencies
+#-----------------------------------------------------------------------------
+if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL)
+ set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
+ set (${HDF5_PACKAGE_NAME}_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
+endif ()
+
+#-----------------------------------------------------------------------------
+# Directories
+#-----------------------------------------------------------------------------
+set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" "${${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH}" )
+
+set (${HDF5_PACKAGE_NAME}_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@")
+set_and_check (${HDF5_PACKAGE_NAME}_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@")
+
+if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
+ set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@" )
+endif ()
+
+if (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB)
+ set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_CPP "@PACKAGE_INCLUDE_INSTALL_DIR@" )
+endif ()
+
+if (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB)
+ set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_HL "@PACKAGE_INCLUDE_INSTALL_DIR@" )
+endif ()
+
+if (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB AND ${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB)
+ set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_HL_CPP "@PACKAGE_INCLUDE_INSTALL_DIR@" )
+endif ()
+
+if (${HDF5_PACKAGE_NAME}_BUILD_TOOLS)
+ set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_TOOLS "@PACKAGE_INCLUDE_INSTALL_DIR@" )
+ set_and_check (${HDF5_PACKAGE_NAME}_TOOLS_DIR "@PACKAGE_CURRENT_BUILD_DIR@/bin" )
+endif ()
+
+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 ()
+
+#-----------------------------------------------------------------------------
+# 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 built hdf5 as a subproject
+#-----------------------------------------------------------------------------
+if (NOT TARGET "@HDF5_PACKAGE@")
+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ endif ()
+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip")
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ endif ()
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
+ set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
+endif ()
+
+check_required_components(hdf5)
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in
deleted file mode 100644
index c1c4498..0000000
--- a/config/cmake/hdf5-config.cmake.install.in
+++ /dev/null
@@ -1,81 +0,0 @@
-#-----------------------------------------------------------------------------
-# HDF5 Config file for compiling against hdf5 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)
-
-#-----------------------------------------------------------------------------
-# 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@)
-set (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
-
-#-----------------------------------------------------------------------------
-# 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 "${_IMPORT_PREFIX}/include" "${HDF5_MPI_C_INCLUDE_PATH}" )
-
-if (HDF5_BUILD_FORTRAN)
- set (HDF5_INCLUDE_DIR_FORTRAN "${_IMPORT_PREFIX}/include" )
-endif (HDF5_BUILD_FORTRAN)
-
-if (HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_CPP "${_IMPORT_PREFIX}/include" )
-endif (HDF5_BUILD_CPP_LIB)
-
-if (HDF5_BUILD_HL_LIB)
- set (HDF5_INCLUDE_DIR_HL "${_IMPORT_PREFIX}/include" )
-endif (HDF5_BUILD_HL_LIB)
-
-if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
- set (HDF5_INCLUDE_DIR_HL_CPP "${_IMPORT_PREFIX}/include" )
-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" )
-endif (HDF5_BUILD_TOOLS)
-
-#-----------------------------------------------------------------------------
-# 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 built hdf5 as a subproject
-#-----------------------------------------------------------------------------
-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)
- 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)
- endif (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- 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/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 3b235d4..3395906 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -10,6 +10,7 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
# Add Test Lib
#-----------------------------------------------------------------------------
add_library (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c)
+set_source_files_properties (t.c PROPERTIES LANGUAGE C)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
@@ -18,12 +19,14 @@ target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ${LIB_TYPE})
set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
+ LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then
# fall back to F2003. If F2003 not supported then use F90 for the tests.
+set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran)
if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90)
elseif (HDF5_ENABLE_F2003)
@@ -36,7 +39,7 @@ endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
set (SHARED_LINK_FLAGS " ")
if (WIN32)
if (BUILD_SHARED_LIBS)
- set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL)
+ set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_TEST_DLL)
if (MSVC)
set (SHARED_LINK_FLAGS "/DLL")
endif (MSVC)
@@ -53,6 +56,7 @@ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE})
set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
+ LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index c3a6562..f489224 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -45,6 +45,7 @@ set (HDF5_HL_F90_F_SRCS
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90
)
+set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran)
add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
set (SHARED_LINK_FLAGS " ")
@@ -72,6 +73,7 @@ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE})
set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
+ LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index b2f531a..248f03f 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -379,7 +379,7 @@ These five steps are described in detail below.
set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
- set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+ set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
@@ -552,7 +552,7 @@ HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF
HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF
HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF
if (HDF5_BUILD_FORTRAN)
- HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF
+ HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON
---------------- HDF5 Advanced Options ---------------------
HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF
@@ -714,8 +714,8 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
#### fortran ####
-### enable Fortran 2003
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
+### disable Fortran 2003
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
### disable Fortran
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9b7d790..1c146ce 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -709,8 +709,8 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF)
if (HDF5_ENABLE_DEBUG_APIS)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
- COMPILE_DEFINITIONS
- "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG"
+ COMPILE_DEFINITIONS
+ "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG"
)
endif (HDF5_ENABLE_DEBUG_APIS)