Halide
Halide copied to clipboard
Upgrade CMake to 3.24 and refactor FetchContent usage
WIP -- still to-do is to audit our packaging rules (and maybe add some GHA tests, hmm) and update the READMEs.
This PR replaces all usage of FetchContent
inside our build with find_package
. When Halide is the top-level project, i.e. not being included into another project via FetchContent
(or add_subdirectory
), it will load the new cmake/dependencies.cmake
. This file contains a series of FetchContent
calls that hook find_package
. Some dependencies, like wabt
and flatbuffers
do not play nicely with FetchContent
, and so some patches must be injected. We should consider opening issues/PRs upstream to enable us to remove these hacks down the line. (Unfortunately, this is difficult for me to do).
FetchContent can be disabled wholesale by setting -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=""
on the CMake command line. This should avoid issues like #5092 resurfacing.
This also makes progress toward #7611 by deferring to the including project's dependency management strategy.
Fixes #7757
Looks like the first step is getting 3.24 installed on all the bots -- I'll attend to that this morning.
We should consider opening issues/PRs upstream to enable us to remove these hacks down the line. (Unfortunately, this is difficult for me to do).
If you can provide guidance on this I can see about making this happen.
You should probably sync to main (again) to eliminate false build failures on OSX
I realize this is still WIP, just wanted to check in and see where the plans are
I'm going to pick this back up soon now that I'm at Adobe. I took one step in #8265
Should target CMake 3.28 now that it's the version on Ubuntu 24.04 LTS