summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-15 21:36:44 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-17 16:58:05 (GMT)
commit3ea746014a7e905b6a6d668bcc4c6305e76b5ec2 (patch)
treebe5d9ceff5334672bf08ed509aae947862cef445 /config
parent95d3b41af07dd1e7532d0a6b453315ee2e3e5968 (diff)
downloadhdf5-3ea746014a7e905b6a6d668bcc4c6305e76b5ec2.zip
hdf5-3ea746014a7e905b6a6d668bcc4c6305e76b5ec2.tar.gz
hdf5-3ea746014a7e905b6a6d668bcc4c6305e76b5ec2.tar.bz2
HDFFV-10845 copy files with windows EOL
Diffstat (limited to 'config')
-rw-r--r--config/cmake/jrunTest.cmake12
-rw-r--r--config/cmake_ext_mod/grepTest.cmake6
-rw-r--r--config/cmake_ext_mod/runTest.cmake12
3 files changed, 20 insertions, 10 deletions
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index 341c382..fa687f5 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -125,8 +125,10 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}")
if (NOT TEST_SKIP_COMPARE)
if (EXISTS ${TEST_FOLDER}/${TEST_REFERENCE})
if (WIN32 OR MINGW)
- file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
if (NOT TEST_SORT_COMPARE)
@@ -187,8 +189,10 @@ if (NOT TEST_SKIP_COMPARE)
# now compare the .err file with the error reference, if supplied
if (TEST_ERRREF)
if (WIN32 OR MINGW)
- file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
+ configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
+ file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
endif ()
# now compare the error output with the error reference
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index 2a30336..ab00e70 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -99,8 +99,10 @@ if (TEST_ERRREF)
if (NOT TEST_SKIP_COMPARE)
if (EXISTS ${TEST_FOLDER}/${TEST_REFERENCE})
if (WIN32 OR MINGW)
- file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 3953c27..a904855 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -187,8 +187,10 @@ endif ()
if (NOT TEST_SKIP_COMPARE)
if (EXISTS ${TEST_FOLDER}/${TEST_REFERENCE})
if (WIN32 OR MINGW)
- file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
if (NOT TEST_SORT_COMPARE)
@@ -249,8 +251,10 @@ if (NOT TEST_SKIP_COMPARE)
# now compare the .err file with the error reference, if supplied
if (TEST_ERRREF)
if (WIN32 OR MINGW)
- file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
+ configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
+ file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
endif ()
# now compare the error output with the error reference