summaryrefslogtreecommitdiffstats
path: root/fortran/src/CMakeLists.txt
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-28 15:11:12 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-28 15:11:12 (GMT)
commitea6364e818e6611865269a012d2f5480fe413a3d (patch)
tree97cf0fe29880cbae1e5e8eb4b6148a3d4badfa0e /fortran/src/CMakeLists.txt
parentcec6cbe9cc0171c19eea826c91f2e625bbb66cf8 (diff)
downloadhdf5-ea6364e818e6611865269a012d2f5480fe413a3d.zip
hdf5-ea6364e818e6611865269a012d2f5480fe413a3d.tar.gz
hdf5-ea6364e818e6611865269a012d2f5480fe413a3d.tar.bz2
[svn-r26937] added generated Fortran file to Fortran CMakeList.txt
Diffstat (limited to 'fortran/src/CMakeLists.txt')
-rw-r--r--fortran/src/CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 18af3f6..eff133d 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -31,7 +31,7 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_D
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
-# H5test_kind.F90 used to generate H5fortran_detect.F90
+# H5test_kind.F90 used to generate H5fortran_detect.F90 and H5_KINDff.F90
# H5fortran_detect.F90 used to generate H5fort_type_defines.h
# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90
#-----------------------------------------------------------------------------
@@ -65,6 +65,11 @@ add_custom_command (
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS H5test_FortranHavekind
)
+add_custom_target (h5_kindff
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
+ DEPENDS H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90
+)
+set_target_properties (h5_kindff PROPERTIES LINKER_LANGUAGE Fortran)
#-----------------------------------------------------------------------------
add_executable (H5fortran_detect
${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90
@@ -136,7 +141,7 @@ set (f90CStub_C_HDRS
${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
-add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
+add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS} ${h5_kindff})
TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
@@ -153,6 +158,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
set (f90_F_SRCS
# generated files
${HDF5_F90_BINARY_DIR}/H5fortran_types.F90
+ ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90
# normal distribution
${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90
@@ -253,6 +259,7 @@ set (mod_files
${MOD_BUILD_DIR}/h5s.mod
${MOD_BUILD_DIR}/h5t.mod
${MOD_BUILD_DIR}/h5z.mod
+ ${MOD_BUILD_DIR}/h5_kind.mod
)
install (
FILES