Q: Log file write error while using Cmake, Ninja, PREFast with MSVC Turning on the /analyze flag to run PREFast for Windows builds using MSVC non deterministically throws the below error.  I think this is because ninja is trying to optimize builds by compiling files from the same target simultaneously but since each target logs to a single file, MSVC is not able to edit the file while another process is writing to the same log file because the file the other process is compiling belongs to the same target.
fatal error C1258: Failed to save XML Log file '<path to log file>.xml'. The process cannot access the file because it is being used by another process.


*

*Can I write to different files per target ?

*Can I make MSVC smarter and force it to attempt to write despte another process writing to it ?

*I don't want to set paralell jobs to 1 , so do I have any other options ?

