It would be nice to be able to import Halide in a C++ project using the CMake package FetchContent,
eg:
cmake_minimum_required(VERSION 3.22)
project(HalideTests)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
include(FetchContent)
# Halide
FetchContent_Declare(halide
GIT_REPOSITORY https://github.com/halide/Halide
GIT_TAG v15.0.1)
FetchContent_GetProperties(halide)
if(NOT halide_POPULATED)
message("Cloning HALIDE")
FetchContent_Populate(halide)
add_subdirectory(
${halide_SOURCE_DIR}
${halide_BINARY_DIR})
endif()
FetchContent_MakeAvailable(halide)
#find_package(Halide REQUIRED)
add_executable(HalideTests
"${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp"
)
target_link_libraries(HalideTests PRIVATE Halide::Halide)
When doing that, it complains that it doesn’t find LLVM,
I tried to use fetchcontent on llvm (which works perfectly but requires a lot of space and compile time), but Halide still didn’t find it.
Is someone able to make Halide work with FetchContent?
It would be nice to be able to import Halide in a C++ project using the CMake package FetchContent,
eg:
When doing that, it complains that it doesn’t find LLVM,
I tried to use fetchcontent on llvm (which works perfectly but requires a lot of space and compile time), but Halide still didn’t find it.
Is someone able to make Halide work with FetchContent?