mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
HDFFV-10398 use the target name for custom commands
This commit is contained in:
parent
2f18da435e
commit
0866bc0bb8
@ -78,22 +78,20 @@ add_executable (H5match_types
|
||||
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
|
||||
)
|
||||
set (CMD $<TARGET_FILE:H5match_types>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
|
||||
${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5match_types>
|
||||
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
|
||||
DEPENDS H5match_types
|
||||
)
|
||||
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)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CMDSH $<TARGET_FILE:H5match_types>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
|
||||
${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
|
||||
COMMAND ${CMDSH}
|
||||
COMMAND $<TARGET_FILE:H5match_types>
|
||||
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
|
||||
DEPENDS H5match_types
|
||||
)
|
||||
@ -171,10 +169,9 @@ set (f90_F_GEN_SOURCES
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90
|
||||
)
|
||||
set (CMD $<TARGET_FILE:H5_buildiface>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5_buildiface>
|
||||
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
|
||||
DEPENDS ${f90_F_GEN_SOURCES}
|
||||
COMMENT "Generating the H5_gen.F90 file"
|
||||
@ -185,10 +182,9 @@ add_custom_target (H5gen ALL
|
||||
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CMDSH $<TARGET_FILE:H5_buildiface>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
|
||||
COMMAND ${CMDSH}
|
||||
COMMAND $<TARGET_FILE:H5_buildiface>
|
||||
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
|
||||
DEPENDS ${f90_F_GEN_SOURCES}
|
||||
COMMENT "Generating the H5_gen.F90 shared file"
|
||||
|
@ -74,10 +74,9 @@ if (BUILD_SHARED_LIBS)
|
||||
)
|
||||
endif ()
|
||||
|
||||
set (CMD $<TARGET_FILE:H5_test_buildiface>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5_test_buildiface>
|
||||
WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static
|
||||
DEPENDS H5_test_buildiface
|
||||
COMMENT "Generating the tf_gen.F90 file"
|
||||
@ -88,10 +87,9 @@ add_custom_target (H5testgen ALL
|
||||
set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CMDSH $<TARGET_FILE:H5_test_buildiface>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
|
||||
COMMAND ${CMDSH}
|
||||
COMMAND $<TARGET_FILE:H5_test_buildiface>
|
||||
WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared
|
||||
DEPENDS H5_test_buildiface
|
||||
COMMENT "Generating the tf_gen.F90 shared file"
|
||||
|
@ -109,10 +109,9 @@ set (HDF5_HL_F90_F_BASE_SOURCES
|
||||
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90
|
||||
)
|
||||
|
||||
set (CMD $<TARGET_FILE:H5HL_buildiface>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5HL_buildiface>
|
||||
WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}/static
|
||||
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
|
||||
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files"
|
||||
@ -126,10 +125,9 @@ set_source_files_properties (
|
||||
PROPERTIES GENERATED TRUE
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CMDSH $<TARGET_FILE:H5HL_buildiface>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5TBff_gen.F90
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5HL_buildiface>
|
||||
WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}/shared
|
||||
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
|
||||
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 shared files"
|
||||
|
@ -853,10 +853,9 @@ if (MSVC OR MINGW)
|
||||
target_link_libraries (H5detect "ws2_32.lib")
|
||||
endif ()
|
||||
|
||||
set (CMD $<TARGET_FILE:H5detect>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5detect>
|
||||
ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c
|
||||
DEPENDS H5detect
|
||||
)
|
||||
@ -867,10 +866,9 @@ if (MSVC OR MINGW)
|
||||
target_link_libraries (H5make_libsettings "ws2_32.lib")
|
||||
endif ()
|
||||
|
||||
set (CMD $<TARGET_FILE:H5make_libsettings>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5make_libsettings>
|
||||
ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
|
||||
DEPENDS H5make_libsettings
|
||||
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
|
||||
@ -905,18 +903,16 @@ set (install_targets ${HDF5_LIB_TARGET})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared")
|
||||
set (CMD $<TARGET_FILE:H5detect>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_BINARY_DIR}/shared/H5Tinit.c
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5detect>
|
||||
ARGS > ${HDF5_BINARY_DIR}/shared/H5Tinit.c
|
||||
DEPENDS H5detect
|
||||
WORKING_DIRECTORY ${HDF5_BINARY_DIR}/shared
|
||||
)
|
||||
set (CMD $<TARGET_FILE:H5make_libsettings>)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c
|
||||
COMMAND ${CMD}
|
||||
COMMAND $<TARGET_FILE:H5make_libsettings>
|
||||
ARGS > ${HDF5_BINARY_DIR}/shared/H5lib_settings.c
|
||||
DEPENDS H5make_libsettings
|
||||
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
|
||||
|
Loading…
Reference in New Issue
Block a user