diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 12b7db0..778505f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -950,6 +950,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) ) add_custom_command ( OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 COMMAND ${HDF5_BATCH_CMD} ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} COMMAND ${CMAKE_COMMAND} @@ -965,6 +966,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" COMMAND ${CMAKE_COMMAND} @@ -977,6 +979,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) else () add_custom_command ( OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect> ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c COMMAND ${CMAKE_COMMAND} @@ -987,6 +990,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" COMMAND ${CMAKE_COMMAND} @@ -998,6 +1002,26 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) endif () endif () set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) +else () + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 + COMMAND ${CMAKE_COMMAND} + ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 + DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + ) + if (BUILD_SHARED_LIBS) + add_custom_command ( + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" + COMMAND ${CMAKE_COMMAND} + ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 + DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + ) + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) + endif () endif () add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) @@ -1011,6 +1035,7 @@ target_link_libraries (H5make_libsettings add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c + ${HDF5_BINARY_DIR}/gen_SRCS.stamp2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5make_libsettings> ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c COMMAND ${CMAKE_COMMAND} @@ -1022,6 +1047,7 @@ set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c PROPERTIES GENE if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c + ${HDF5_BINARY_DIR}/shared/shared_gen_SRCS.stamp2 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${HDF5_BINARY_DIR}/H5lib_settings.c" "${HDF5_BINARY_DIR}/shared/H5lib_settings.c" COMMAND ${CMAKE_COMMAND} |