Revision f578b60b80ba7877b2f23a9f4866ba785842d61f authored by Dillon Sharlet on 20 November 2020, 02:10:42 UTC, committed by Dillon Sharlet on 20 November 2020, 02:10:42 UTC
CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(local_laplacian)
enable_testing()
# Set up language settings
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
# Find Halide
find_package(Halide REQUIRED)
# Generator
add_executable(local_laplacian.generator local_laplacian_generator.cpp)
target_link_libraries(local_laplacian.generator PRIVATE Halide::Generator Halide::Tools)
# Filters
add_halide_library(local_laplacian FROM local_laplacian.generator)
add_halide_library(local_laplacian_auto_schedule FROM local_laplacian.generator
GENERATOR local_laplacian
AUTOSCHEDULER Halide::Mullapudi2016)
# Main executable
add_executable(local_laplacian_process process.cpp)
target_link_libraries(local_laplacian_process
PRIVATE
Halide::ImageIO
local_laplacian
local_laplacian_auto_schedule)
# Test that the app actually works!
set(IMAGE ${CMAKE_CURRENT_LIST_DIR}/../images/rgb.png)
if (EXISTS ${IMAGE})
configure_file(${IMAGE} rgb.png COPYONLY)
add_test(NAME local_laplacian_process COMMAND local_laplacian_process rgb.png 8 1 1 10 out.png)
set_tests_properties(local_laplacian_process PROPERTIES
LABELS internal_app_tests
PASS_REGULAR_EXPRESSION "Success!"
SKIP_REGULAR_EXPRESSION "\\[SKIP\\]")
endif ()
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...