summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fortran/src/CMakeLists.txt13
-rw-r--r--src/CMakeLists.txt7
2 files changed, 16 insertions, 4 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 258efe8..120dc1a 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -88,7 +88,7 @@ if (NOT ONLY_SHARED_LIBS)
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
+ DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
@@ -101,7 +101,7 @@ if (BUILD_SHARED_LIBS)
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
- DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
+ DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
@@ -134,10 +134,19 @@ set (f90CStub_C_HDRS
# generated files
${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
)
+add_custom_target (H5gen_i ALL
+ DEPENDS H5match_types ${f90CStub_C_HDRS}
+)
+set_source_files_properties (${f90CStub_C_HDRS} PROPERTIES GENERATED TRUE)
+
set (f90CStub_C_SHHDRS
# generated files
${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
)
+add_custom_target (H5gen_iSH ALL
+ DEPENDS H5match_types ${f90CStub_C_SHHDRS}
+)
+set_source_files_properties (${f90CStub_C_SHHDRS} PROPERTIES GENERATED TRUE)
if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 74fd71f..a2d4c37 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1044,6 +1044,7 @@ if (LOCAL_BATCH_TEST)
endif ()
endif ()
+set (lib_prog_deps)
if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -1055,6 +1056,7 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
target_compile_options(H5detect
PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>"
)
+ set (lib_prog_deps ${lib_prog_deps} H5detect)
if (HDF5_BATCH_H5DETECT)
configure_file (
@@ -1146,6 +1148,7 @@ target_link_libraries (H5make_libsettings
target_compile_options(H5make_libsettings
PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>"
)
+set (lib_prog_deps ${lib_prog_deps} H5make_libsettings)
#-----------------------------------------------------------------------------
# Add Target to clang-format
@@ -1189,7 +1192,7 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
if (NOT ONLY_SHARED_LIBS)
set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c)
add_custom_target (gen_${HDF5_LIB_TARGET} ALL
- DEPENDS H5make_libsettings ${gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2
+ DEPENDS ${lib_prog_deps} ${gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2
COMMENT "Generation target files"
)
@@ -1228,7 +1231,7 @@ endif ()
if (BUILD_SHARED_LIBS)
set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c)
add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL
- DEPENDS H5make_libsettings ${shared_gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
+ DEPENDS ${lib_prog_deps} ${shared_gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
COMMENT "Shared generation target files"
)