1# Basic CMake setup 2cmake_minimum_required(VERSION 3.1 FATAL_ERROR) 3project(custom_backend) 4 5if(USE_ROCM) 6include(utils) 7include(LoadHIP) 8endif() 9find_package(Torch REQUIRED) 10 11add_library(custom_backend SHARED custom_backend.cpp) 12set_property(TARGET custom_backend PROPERTY CXX_STANDARD 17) 13target_link_libraries(custom_backend "${TORCH_LIBRARIES}") 14 15add_executable(test_custom_backend test_custom_backend.cpp) 16set_property(TARGET test_custom_backend PROPERTY CXX_STANDARD 17) 17target_link_libraries(test_custom_backend custom_backend) 18