-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
33 lines (29 loc) · 952 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.16)
project(ttvecadd CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if("$ENV{TT_METAL_HOME}" STREQUAL "")
message(FATAL_ERROR "TT_METAL_HOME is not set")
endif()
if("$ENV{ARCH_NAME}" STREQUAL "")
message(FATAL_ERROR "ARCH_NAME is not set")
endif()
message($ENV{TT_METAL_HOME}/tt_metal/third_party/src/firmware/riscv/$ENV{ARCH_NAME})
add_executable(ttvecadd ttvecadd.cpp)
target_include_directories(ttvecadd PRIVATE
$ENV{TT_METAL_HOME}
$ENV{TT_METAL_HOME}/tt_metal
$ENV{TT_METAL_HOME}/tt_metal/third_party/umd
$ENV{TT_METAL_HOME}/tt_metal/hw/inc/$ENV{ARCH_NAME}
$ENV{TT_METAL_HOME}/tt_metal/hw/inc/
$ENV{TT_METAL_HOME}/tt_metal/third_party/umd/src/firmware/riscv/$ENV{ARCH_NAME}
)
target_link_directories(ttvecadd PRIVATE
$ENV{TT_METAL_HOME}/build/lib
)
target_link_libraries(ttvecadd PRIVATE
tt_metal
yaml-cpp
fmt
)