mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
`add_custom_target_command` has a note in its documentation that ask for all the `COMMAND` arguments to immediately follow the first argument, or the function will misbehave. In the two cases below, the `COMMAND` arguments were after the `OUTPUT` multivalue, and ended by mistake inside the `OUTPUT` parameter. This kinda works because CMake will interpolate those back, but causes problems for dependency resolution, marking many targets as dirty. When one of those targets is dependent by the compiler, this can create a huge cascade rebuild. Fix the two cases I found where `add_custom_target_command` was used incorrectly. This removes cascade rebuilds in my working directory, and hope it applies to everybody.