ExternalProject BYPRODUCTS for download step breaks same-source-with-deps projects
The following discussion from !8823 (merged) should be addressed:
-
@hjmallon started a discussion: (+1 comment) This has caused a regression in our build system. We had ExternalProject running more than one on a single source (e.g. for multi-config Release/Debug and for multi-arch arm64/x86_64 on macOS). Before cmake 3.28 this works well, as doing a
file(DOWNLOAD)
with a known hash exits with "skipping download as file already exists with expected SHA1 hash". I understand this is a fix for a bug in that area, but we never hit that bug as we have dependancies between the multiple runs.However now Xcode (when used with Xcode generator) just errors and cannot build these projects.
I understand that this change might be better, but I'm not sure how to reconfigure our ExternaProject calls, since we do not want to download twice, but we do want to extract the file twice (to make sure no artifacts remain from the first build in the second.