Retry build steps on specific errors

Is it possible to (silently) retry build steps if specific errors occur?

If some pattern is in stdout/err, it will not log the error but retry it (maybe after some sleep).

Details:
The particular error is
mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file “run\eventopen.exe”. Access is denied.

Where the binary name is variable of course. The reason is the antivir program and the IT is not fond of the idea to exclude files. See also: c++ - mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file ... Access is denied - Stack Overflow

There is no mechanism to do so. You’d need to write a compiler wrapper that detects these cases and reruns the compiler internally. There’s the CMAKE_<LANG>_COMPILER_LAUNCHER variable to add this to all rules.

Thanks, I thought so.