Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake 3.28 breaks universal 2 hunter builds with Xcode generator #730

Closed
hjmallon opened this issue Dec 20, 2023 · 2 comments
Closed

cmake 3.28 breaks universal 2 hunter builds with Xcode generator #730

hjmallon opened this issue Dec 20, 2023 · 2 comments

Comments

@hjmallon
Copy link

  • I've read Brief overview section and do understand basic concepts. [Yes]
  • I've read F.A.Q. section and there is no solution to my problem there. [Yes]
  • I've read Code of Conduct, I promise to be polite and will do my best at being constructive. [Yes]
  • I've read Reporting bugs section carefully. [Yes]
  • I've checked that all the hunter_add_package/find_package API used by me in the example is the same as in documentation. [Yes]
  • I'm using latest Hunter URL/SHA1. [Yes]

To reproduce

  • Set universal2 in toolchain and build with Xcode generator (e.g. osx-arch-universal2-cxx17 polly toolchain)
  • Build any project with Hunter in it with cmake 3.28

OR

  • Set Xcode generator (not universal 2)
  • Build any project with Hunter in it with CMake based dependancies (e.g. GTest)

cmake 3.28 does

The ExternalProject module now declares BYPRODUCTS for the downloaded file for generated download steps. Previously, if multiple external projects downloaded to the same file, hash verification could fail. Now, when using the Ninja Generators, this scenario is detected and Ninja will raise an error stating that multiple rules generate the same file.

When we build universal projects in Hunter we often build more than once (for each arch) then lipo them together. In order to save time the same download is used for each. Unofrtunately that change in cmake 3.28 means that Xcode errors as two build stages both report creating the same file.

I am using Xcode v15.1

@hjmallon
Copy link
Author

I believe it will also break ninja multiconfig builds.

Here is an MR to fix #731

@hjmallon
Copy link
Author

Closing, since CMake are going to revert the change for now https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant