summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod/runTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake_ext_mod/runTest.cmake')
-rw-r--r--config/cmake_ext_mod/runTest.cmake12
1 files changed, 8 insertions, 4 deletions
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