PCH/REUSE_FROM/MSVC: Recent PR in 3.18 makes every target build sleep for 30 seconds
When using pre-compiled headers with MSVC there is now a file that will do a sleep for 1 second 30 times for every build. This was introduced in this MR !4787 (merged). The file is called copy_idb_pdb.cmake. It's executed on every pre-build step.
The file checks if the precompiled header target's .pdb file is newer and if it's not it sleeps, why is that? I commented the sleep and I have no problems building, is it for a specific use case? There is also a check to see if the file pch's .pdb exists, is the sleep for this condition? There is no sleeping problems when rebuilding the target (because the target's pdb file is not newer because it dosen't exist).
Here is the line where the sleep is in the source code https://gitlab.kitware.com/cmake/cmake/-/blob/v3.18.1/Source/cmLocalGenerator.cxx#L2794