[vcpkg] Enhance detection of AV messing with builds (#33279)

The current error message matching attempt is too strict as the error
message occasionally spells out the extension (i.e. `mt.exe` instead of
`mt`).

Co-authored-by: Monica <liuyumei01@beyondsoft.com>
This commit is contained in:
Henrik Gaßmann 2023-08-29 09:18:59 +02:00 committed by GitHub
parent 8bbffa1323
commit 24118478f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ function(vcpkg_execute_build_process)
RESULT_VARIABLE error_code
)
endif()
elseif(all_contents MATCHES "mt : general error c101008d: ")
elseif(all_contents MATCHES "mt(\\.exe)? : general error c101008d: ")
# Antivirus workaround - occasionally files are locked and cause mt.exe to fail
message(STATUS "mt.exe has failed. This may be the result of anti-virus. Disabling anti-virus on the buildtree folder may improve build speed")
foreach(iteration RANGE 1 3)