summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-09-04 13:55:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-09-04 13:55:29 (GMT)
commit4906383c0f4f7e9fba5b085e6902a864b352c5e4 (patch)
treea4ec26c68325121ab0d827a3cd3127de0aad368f /fortran/test
parentbea85e0705d200de16d8e1affad5d2abb6954b6e (diff)
downloadhdf5-4906383c0f4f7e9fba5b085e6902a864b352c5e4.zip
hdf5-4906383c0f4f7e9fba5b085e6902a864b352c5e4.tar.gz
hdf5-4906383c0f4f7e9fba5b085e6902a864b352c5e4.tar.bz2
[svn-r27676] Fix dependencies of generated file
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt37
1 files changed, 20 insertions, 17 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index d2a30ef..0cbd17f 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -75,10 +75,27 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
)
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
-set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran)
-add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90)
+set (HDF5_F90_TF_SRCS
+ # generated files
+ ${HDF5_F90_BINARY_DIR}/tf_gen.F90
+)
+set_source_files_properties (
+ ${HDF5_F90_BINARY_DIR}/tf_gen.F90
+ PROPERTIES GENERATED TRUE
+)
+set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/${HDF5_F90_TF_SRCS} PROPERTIES LANGUAGE Fortran)
+
+set (CMD $<TARGET_FILE:H5_test_buildiface>)
+add_custom_target (H5testgen ALL
+ COMMAND ${CMD}
+#v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/tf_gen.F90
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
+ DEPENDS H5_test_buildiface
+)
+
+add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_TF_SRCS})
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90)
+ add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_TF_SRCS})
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ")
@@ -128,20 +145,6 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endif (WIN32)
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
-set (CMD $<TARGET_FILE:H5_test_buildiface>)
-#add_custom_command (
-# OUTPUT ${HDF5_F90_BINARY_DIR}/tf_gen.F90
-# COMMAND ${CMD}
-# WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
-# DEPENDS H5_test_buildiface
-#)
-add_custom_target (H5testgen ALL
- COMMAND ${CMD}
-#v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/tf_gen.F90
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
- DEPENDS H5_test_buildiface
-)
-
#-----------------------------------------------------------------------------
# Add Tests
#-----------------------------------------------------------------------------