diff options
Diffstat (limited to 'Tests/RunCMake/Configure/FailCopyFileABI-check.cmake')
-rw-r--r-- | Tests/RunCMake/Configure/FailCopyFileABI-check.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/Configure/FailCopyFileABI-check.cmake b/Tests/RunCMake/Configure/FailCopyFileABI-check.cmake new file mode 100644 index 000000000..db0cb0a34 --- /dev/null +++ b/Tests/RunCMake/Configure/FailCopyFileABI-check.cmake @@ -0,0 +1,14 @@ +set(log "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/CMakeError.log") +if(EXISTS "${log}") + file(READ "${log}" error_log) +else() + set(error_log "") +endif() +string(REPLACE "\r\n" "\n" regex "Cannot copy output executable.* +to destination specified by COPY_FILE:.* +Unable to find the executable at any of: + .*\\.missing") +if(NOT error_log MATCHES "${regex}") + string(REGEX REPLACE "\n" "\n " error_log " ${error_log}") + set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected COPY_FILE failure message:\n${error_log}") +endif() |