mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
HDFFV-10845 skip test if CMake command doesn't support ignore EOL
This commit is contained in:
parent
3ea746014a
commit
741ef0aaef
@ -28,6 +28,12 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
)
|
||||
endif ()
|
||||
|
||||
# CMake version 3.14 added option --ignore-eol to compare files
|
||||
# cmake -E compare_files --ignore-eol file1 file2
|
||||
#if(CMAKE_VERSION VERSION_LESS "3.14.0" AND WIN32)
|
||||
# MESSAGE(FATAL_ERROR "Windows builds requires a minimum of CMake 3.14")
|
||||
#endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Instructions for use : Sub-Project Build
|
||||
#
|
||||
|
@ -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 ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user