Skip to content

Commit

Permalink
Change POST_BUILD for h5watch-files to custom target and commands.
Browse files Browse the repository at this point in the history
This keeps the command line from getting too long with the ninja generator.
  • Loading branch information
billhoffman committed Jul 4, 2017
1 parent 99e4409 commit 8fa0af3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions hl/tools/h5watch/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,14 @@ set (H5WATCH_TEST_FILES

# make test dir
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
add_custom_target(h5watch-files ALL COMMENT "Copying files needed by h5watch tests")

foreach (h5watch_file ${H5WATCH_TEST_FILES})
set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5watch_file}")
#message (STATUS " Copying ${h5watch_file}")
add_custom_command (
TARGET h5watch-files
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TOOLS_DIR}/testfiles/${h5watch_file} ${dest}
)
HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_DIR}/testfiles/${h5watch_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5watch_file}" "h5watch-files_files")
endforeach ()

add_custom_target(h5watch-files_files ALL COMMENT "Copying files needed by h5watch-files tests" DEPENDS ${h5watch-files_files_list})


##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
Expand Down

0 comments on commit 8fa0af3

Please sign in to comment.