diff options
Diffstat (limited to 'tools/h5dump/CMakeLists.txt')
-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} |