# Match the minimum required version of onnx-mlir cmake_minimum_required(VERSION 3.20.0) project(raptor) # Add symlink to PIM as accelerator in onnx-mlir function(raptor_ensure_symlink link_path target_path) get_filename_component(link_parent "${link_path}" DIRECTORY) if(NOT EXISTS "${link_parent}") message(FATAL_ERROR "Directory not found: ${link_parent}") endif() if(NOT EXISTS "${link_path}") message(STATUS "Creating symlink ${link_path} -> ${target_path}") file(CREATE_LINK "${target_path}" "${link_path}" SYMBOLIC ) endif() endfunction() raptor_ensure_symlink( "${CMAKE_CURRENT_SOURCE_DIR}/onnx-mlir/src/Accelerators/PIM" "${CMAKE_CURRENT_SOURCE_DIR}/src/PIM" ) raptor_ensure_symlink( "${CMAKE_CURRENT_SOURCE_DIR}/onnx-mlir/test/accelerators/PIM" "${CMAKE_CURRENT_SOURCE_DIR}/test/PIM" ) add_subdirectory(onnx-mlir)