VS: Add policy to build custom commands concurrently
In !8093 (merged) we added BuildInParallel
to
custom commands in .vcxproj
files, but that had to be reverted by
!8297 (merged) because some projects may have
custom commands that accidentally rely on serial execution in MSBuild.
Add a policy to use BuildInParallel
for custom commands in projects
that have been updated to set the policy to NEW
.
Also disallow FindCUDA with CMP0147 under Visual Studio.
Its custom commands invoke nvcc
, which invokes cl
. Under VS
this is done without a /FS
flag, so .pdb
generation races if we
use BuildInParallel
. The FindCUDA module has already been removed by
policy CMP0146 after being deprecated since CMake 3.10, so it is
simplest to just disallow this combination of features.
Fixes: #18405 (closed)
Issue: #24576 (closed)