-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
30 lines (30 loc) · 1.04 KB
/
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
set(eapp_bin hello)
set(eapp_src eapp/tinyNN-predict.c)
set(host_bin hello-runner)
set(host_src host/host.cpp)
set(package_name "hello.ke")
set(package_script "./hello-runner hello eyrie-rt")
if(RISCV32)
set(eyrie_plugins "freemem io_syscall linux_syscall env_setup rv32")
else()
set(eyrie_plugins "freemem io_syscall linux_syscall env_setup")
endif()
# eapp
add_executable(${eapp_bin} ${eapp_src})
target_link_libraries(${eapp_bin} "-static")
# host
add_executable(${host_bin} ${host_src})
target_link_libraries(${host_bin} ${KEYSTONE_LIB_HOST} ${KEYSTONE_LIB_EDGE})
# add target for Eyrie runtime (see keystone.cmake)
set(eyrie_files_to_copy .options_log eyrie-rt)
add_eyrie_runtime(${eapp_bin}-eyrie
${eyrie_plugins}
${eyrie_files_to_copy})
# add target for packaging (see keystone.cmake)
add_keystone_package(${eapp_bin}-package
${package_name}
${package_script}
${eyrie_files_to_copy} ${eapp_bin} ${host_bin})
add_dependencies(${eapp_bin}-package ${eapp_bin}-eyrie)
# add package to the top-level target
add_dependencies(examples ${eapp_bin}-package)