-
Notifications
You must be signed in to change notification settings - Fork 183
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
46 lines (35 loc) · 1.27 KB
/
CMakeLists.txt
File metadata and controls
46 lines (35 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# (c) Copyright 2023 Advanced Micro Devices, Inc.
# parameters
# -DXRT_INC_DIR: Full path to src/runtime_src/core/include in XRT cloned repo
# -DXRT_LIB_DIR: Path to xrt_coreutil.lib
# -DTARGET_NAME: Target name to be built
cmake_minimum_required(VERSION 3.30)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(IN1_SIZE 8192 CACHE STRING "in1 buffer size")
set(IN2_SIZE 4 CACHE STRING "in2 buffer size")
set(OUT_SIZE 8192 CACHE STRING "out buffer size")
set(INT_BIT_WIDTH 16 CACHE STRING "integer bit width size")
include(../../mlir_aie_init.cmake)
mlir_aie_init_example()
project(${ProjectName})
include(../../common.cmake)
add_executable(${currentTarget} test.cpp)
target_compile_definitions(${currentTarget} PUBLIC
IN1_SIZE=${IN1_SIZE}
IN2_SIZE=${IN2_SIZE}
OUT_SIZE=${OUT_SIZE}
INT_BIT_WIDTH=${INT_BIT_WIDTH}
)
target_include_directories (${currentTarget} PUBLIC ${XRT_INC_DIR})
target_link_directories(${currentTarget} PUBLIC
${XRT_LIB_DIR}
)
target_link_libraries(${currentTarget} PUBLIC
xrt_coreutil
)
target_link_test_utils(${currentTarget})