From 45ac12e6b660edfb312110d4e3b4c6970ff0585a Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:21:21 -0600 Subject: Explicitly use PROJECT_BINARY_DIR in target copy location (#3974) --- HDF5Examples/C/H5T/CMakeLists.txt | 30 +++++++++++++++--------------- HDF5Examples/FORTRAN/H5T/CMakeLists.txt | 32 ++++++++++++++++---------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/HDF5Examples/C/H5T/CMakeLists.txt b/HDF5Examples/C/H5T/CMakeLists.txt index 8c4084f..e0d76e8 100644 --- a/HDF5Examples/C/H5T/CMakeLists.txt +++ b/HDF5Examples/C/H5T/CMakeLists.txt @@ -127,7 +127,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (${H5_LIBVER_DIR} EQUAL 16) @@ -142,7 +142,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif ((${example_name} STREQUAL "h5ex_t_objref" OR ${example_name} STREQUAL "h5ex_t_objrefatt") OR (${example_name} STREQUAL "h5ex_t_regref" OR ${example_name} STREQUAL "h5ex_t_regrefatt")) @@ -153,14 +153,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_EQUAL "1.10") @@ -169,14 +169,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12") @@ -192,7 +192,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/112/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/112/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () else () @@ -200,7 +200,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () else () @@ -210,14 +210,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_EQUAL "1.10") @@ -226,14 +226,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12") @@ -241,14 +241,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () endif () @@ -264,7 +264,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () endif () diff --git a/HDF5Examples/FORTRAN/H5T/CMakeLists.txt b/HDF5Examples/FORTRAN/H5T/CMakeLists.txt index 4ef2256..ab445a2 100644 --- a/HDF5Examples/FORTRAN/H5T/CMakeLists.txt +++ b/HDF5Examples/FORTRAN/H5T/CMakeLists.txt @@ -122,7 +122,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endforeach () @@ -135,14 +135,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif ((${example_name} STREQUAL "h5ex_t_objref_F03" OR ${example_name} STREQUAL "h5ex_t_objrefatt_F03") OR (${example_name} STREQUAL "h5ex_t_regref_F03" OR ${example_name} STREQUAL "h5ex_t_regrefatt_F03")) @@ -153,14 +153,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_EQUAL "1.10") @@ -169,14 +169,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12") @@ -184,14 +184,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () else () @@ -201,14 +201,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}21.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_EQUAL "1.10") @@ -217,14 +217,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}06.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () elseif (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12") @@ -232,14 +232,14 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) else () add_custom_command ( TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () endif () @@ -248,7 +248,7 @@ if (HDF5_BUILD_TOOLS) TARGET ${EXAMPLE_VARNAME}_f90_${example_name} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${example_name}.ddl + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl ) endif () endif () -- cgit v0.12