diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-08-11 16:49:20 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-08-11 16:49:20 (GMT) |
commit | 345a9a3c237cc987a9fc0772c804f1b816a954a8 (patch) | |
tree | 53ad45a11b03dd489ca4a8d77e288cd16e801097 /tools | |
parent | 39b216eb4ff63d4d81bdd793afdf6ba23b2f8c6b (diff) | |
download | hdf5-345a9a3c237cc987a9fc0772c804f1b816a954a8.zip hdf5-345a9a3c237cc987a9fc0772c804f1b816a954a8.tar.gz hdf5-345a9a3c237cc987a9fc0772c804f1b816a954a8.tar.bz2 |
[svn-r19228] File read/write happens at configure time, so moved windows specific copy from test macro to where the expected file is copied.
Tested: windows
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 0038730..bbce1bd 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -267,12 +267,17 @@ IF (BUILD_TESTING) ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/tbin1LE.ddl ) - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/tbinregR.exp - ) + IF (WIN32 AND NOT MINGW) + FILE (READ ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbinregR.exp TEST_STREAM) + FILE (WRITE ${PROJECT_BINARY_DIR}/tbinregR.exp "${TEST_STREAM}") + ELSE (WIN32 AND NOT MINGW) + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/tbinregR.exp + ) + ENDIF (WIN32 AND NOT MINGW) MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) IF (${testtype} STREQUAL "SKIP") @@ -301,10 +306,6 @@ IF (BUILD_TESTING) NAME H5DUMP-output-${resultfile} COMMAND $<TARGET_FILE:h5dump> -d /Dataset1 -s 0 -R -y -o ${PROJECT_BINARY_DIR}/${resultfile}.txt ${PROJECT_BINARY_DIR}/${targetfile} ) - IF (WIN32 AND NOT MINGW) - FILE (READ ${PROJECT_BINARY_DIR}/${resultfile}.exp TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/${resultfile}.exp "${TEST_STREAM}") - ENDIF (WIN32 AND NOT MINGW) ADD_TEST ( NAME H5DUMP-output-cmp-${resultfile} COMMAND ${CMAKE_COMMAND} |