summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-11-12 17:52:46 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-11-12 17:52:46 (GMT)
commitba609275d8874a8681f8f077cfac33b3b516c41f (patch)
tree34dbd39d764247e179fb88bdbcc0fe148ab46641
parentfde902cb45280417248a634f4e3c8c986d8e427a (diff)
downloadhdf5-ba609275d8874a8681f8f077cfac33b3b516c41f.zip
hdf5-ba609275d8874a8681f8f077cfac33b3b516c41f.tar.gz
hdf5-ba609275d8874a8681f8f077cfac33b3b516c41f.tar.bz2
Fix target depends
-rw-r--r--src/CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 376260e..0bf433d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -956,12 +956,19 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
else ()
add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
- ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
+ add_custom_target (gen_H5Tinit ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp" "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c"
+ DEPENDS gen_H5Tinit ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.tmp
+ )
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
endif ()