From b1800ed76717cb80d5de44a9ce1acb8b1f1baca1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 15 Jul 2015 10:10:43 -0500 Subject: [svn-r27390] Add fortran source depends command --- fortran/src/CMakeLists.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 21684b9..21cf457 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -37,7 +37,7 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_B #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind.F90 used to generate various KIND interfaces +# H5test_kind.F90 used to generate various KIND interfaces # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- @@ -128,7 +128,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -set (f90_F_SRCS +set (f90_F_BASE_SRCS # generated files ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 @@ -151,16 +151,27 @@ set (f90_F_SRCS ) set (f90_F_SRCS - ${f90_F_SRCS} - + ${f90_F_BASE_SRCS} + # generated file ${HDF5_F90_BINARY_DIR}/H5_gen.F90 - + # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) +set_source_files_properties( + ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + PROPERTIES OBJECT_DEPENDS + ${f90_F_BASE_SRCS} +) +set_source_files_properties( + ${HDF5_F90_BINARY_DIR}/HDF5.F90 + PROPERTIES OBJECT_DEPENDS + ${f90_F_BASE_SRCS} + ${HDF5_F90_BINARY_DIR}/H5_gen.F90 +) #----------------------------------------------------------------------------- # Add Main fortran library @@ -206,7 +217,6 @@ install ( ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 - ${HDF5_F90_BINARY_DIR}/H5_gen.F90 DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT -- cgit v0.12