summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-16 16:38:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-17 16:58:05 (GMT)
commit741ef0aaefb64ead937d86c5e30c9fbc97f69597 (patch)
tree7668507f8158c470f190e22d307fd007479fc5d3 /tools
parent3ea746014a7e905b6a6d668bcc4c6305e76b5ec2 (diff)
downloadhdf5-741ef0aaefb64ead937d86c5e30c9fbc97f69597.zip
hdf5-741ef0aaefb64ead937d86c5e30c9fbc97f69597.tar.gz
hdf5-741ef0aaefb64ead937d86c5e30c9fbc97f69597.tar.bz2
HDFFV-10845 skip test if CMake command doesn't support ignore EOL
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5dump/CMakeTests.cmake24
1 files changed, 10 insertions, 14 deletions
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 458c6b0..e8e9d07 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -362,13 +362,7 @@
endforeach ()
foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- if (WIN32 OR MINGW)
- configure_file(${HDF5_TOOLS_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} NEWLINE_STYLE CRLF)
- #file (READ ${HDF5_TOOLS_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
- #file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
- else ()
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files")
- endif ()
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files")
endforeach ()
foreach (tst_other_file ${HDF5_REFERENCE_FILES})
@@ -569,13 +563,15 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND}
- -E compare_files ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ endif ()
endif ()
endmacro ()