summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-08-11 16:49:20 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-08-11 16:49:20 (GMT)
commit345a9a3c237cc987a9fc0772c804f1b816a954a8 (patch)
tree53ad45a11b03dd489ca4a8d77e288cd16e801097 /tools
parent39b216eb4ff63d4d81bdd793afdf6ba23b2f8c6b (diff)
downloadhdf5-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.txt21
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}