mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 06:40:48 -06:00
In commit33c15ae2b9(VS: Build custom commands concurrently when possible, 2023-01-19, v3.26.0-rc1~56^2) we added `BuildInParallel` to custom commands in `.vcxproj` files, but that had to be reverted by commitabb1c12162(VS: Revert "Build custom commands concurrently when possible", 2023-03-07, v3.26.0-rc6~3^2) 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`. Fixes: #18405
6 lines
261 B
CMake
6 lines
261 B
CMake
cmake_policy(VERSION 3.26) # CMP0147 left unset
|
|
add_custom_command(OUTPUT "cmp0147-old.txt" COMMAND echo)
|
|
cmake_policy(SET CMP0147 NEW)
|
|
add_custom_command(OUTPUT "cmp0147-new.txt" COMMAND echo)
|
|
add_custom_target(foo DEPENDS "cmp0147-old.txt" "cmp0147-new.txt")
|