TRILAB-142 Change minimum CMake version to 3.12
This commit is contained in:
@@ -90,7 +90,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}")
|
||||
# if the .err file exists and ERRROR_APPEND is enabled
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
|
||||
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
|
||||
list(LENGTH TEST_STREAM test_len)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (TEST_MASK_FILE)
|
||||
STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
|
||||
@@ -210,7 +210,7 @@ set (TEST_COMPARE_RESULT 0)
|
||||
if (NOT TEST_SKIP_COMPARE)
|
||||
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
|
||||
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
|
||||
list(LENGTH TEST_STREAM test_len)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
|
||||
@@ -224,7 +224,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
if (NOT TEST_SORT_COMPARE)
|
||||
# now compare the output with the reference
|
||||
execute_process (
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
|
||||
RESULT_VARIABLE TEST_COMPARE_RESULT
|
||||
)
|
||||
else ()
|
||||
@@ -281,7 +281,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
set (TEST_ERRREF_RESULT 0)
|
||||
if (TEST_ERRREF)
|
||||
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
|
||||
list(LENGTH TEST_STREAM test_len)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
if (WIN32 OR MINGW)
|
||||
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
|
||||
@@ -294,7 +294,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
|
||||
# now compare the error output with the error reference
|
||||
execute_process (
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
|
||||
RESULT_VARIABLE TEST_ERRREF_RESULT
|
||||
)
|
||||
if (TEST_ERRREF_RESULT)
|
||||
@@ -343,7 +343,7 @@ set (TEST_GREP_RESULT 0)
|
||||
if (TEST_GREP_COMPARE)
|
||||
# now grep the output with the reference
|
||||
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
|
||||
list(LENGTH TEST_STREAM test_len)
|
||||
list (LENGTH TEST_STREAM test_len)
|
||||
if (test_len GREATER 0)
|
||||
# TEST_REFERENCE should always be matched
|
||||
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
|
||||
|
||||
Reference in New Issue
Block a user