db0cb0a3460ad08f491a8348300ceeffaa7d98aa
[platform/upstream/cmake.git] / Tests / RunCMake / Configure / FailCopyFileABI-check.cmake
1 set(log "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/CMakeError.log")
2 if(EXISTS "${log}")
3   file(READ "${log}" error_log)
4 else()
5   set(error_log "")
6 endif()
7 string(REPLACE "\r\n" "\n" regex "Cannot copy output executable.*
8 to destination specified by COPY_FILE:.*
9 Unable to find the executable at any of:
10   .*\\.missing")
11 if(NOT error_log MATCHES "${regex}")
12   string(REGEX REPLACE "\n" "\n  " error_log "  ${error_log}")
13   set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected COPY_FILE failure message:\n${error_log}")
14 endif()