Closed antonysigma closed 2 years ago
If you all like this feature, I can contact the Meson team to publish the Halide toolchain plugin (they call it the WarpDB ).
I just want to gather your feedback before I proceed. Either using Meson's technique (warpdb), or Cmake's FetchContect
will result in a lot of download traffic from this Halide Github page. The total number of download is roughly equal to # of users * # of computers * # of projects
. I am not sure if your site can handle this much traffic.
Sorry, Meson is an absolute non-starter for Halide as it has no way to abstract and redistribute rules for calling Halide generators. This is not likely to change as sub-Turing-completeness is one of Meson's core design principles.
https://mesonbuild.com/Syntax.html#userdefined-functions-and-methods https://mesonbuild.com/FAQ.html#why-is-meson-not-just-a-python-module-so-i-could-code-my-build-setup-in-python
Hi, I would like to share a technique to integrate the Halide toolchain to the Meson build system. The trick is to describe where to obtain the prebuilt binaries and header files from Halide Github release page, then add a "placeholder" Meson project config file at the Halide root directory. Here is the download instructions:
I think all this is doing is just giving you access to dependencies for linking to the Halide libraries though? I don't see any reason to give Halide itself a meson.build, even a placeholder one.
As a matter of buildsystem interoperability, ProxImaL should be free to use its own build system, and Halide should be free to use its own build system, and neither one should care what the other uses. What does matter is the dependency communication format, so that once Halide is installed, it can be looked up, possibly by CMake, possibly by Meson. For this purpose, the Halide *config.cmake
files are lacking -- they work, if you (ProxImaL) use cmake too, but don't work if you use Meson (or waf, or scons, or autotools, or premake, genie...)
The solution that makes the most sense to me is for Halide to install halide-generator.pc
, halide-runtime.pc
, etc. as pkg-config files, which are very simple to create and install from cmake, and then Meson/autotools can detect those pretty easily if you install Halide to the system. (IIRC the other build systems don't have integrated functionality, so you have to code your own pkg-config
invocations, but fortunately that's still not especially hard.)
Hi, I would like to share a technique to integrate the Halide toolchain to the Meson build system. The trick is to describe where to obtain the prebuilt binaries and header files from Halide Github release page, then add a "placeholder" Meson project config file at the Halide root directory. Here is the download instructions:
And then, in your (personal) c++ project, declare "halide toolchain" as your project dependency; the Meson build system will automatically infer the build environment for you.
https://github.com/comp-imaging/ProxImaL/blob/master/proximal/halide/meson.build#L7-L10
It is worth to note that Meson build is just yet another build system, compared to CMake or Makefile. If you don't use Mesonbuild, it is fine. You may already know that CMake
>= 3.19
provides the exact same feature: