-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (31 loc) · 959 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
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.19)
project(openeuler_mica)
## set common FLAGS
set(CMAKE_SHARED_LINKER_FLAGS "-pthread")
set(CMAKE_C_FLAGS "-fstack-protector-all -O2 -Wall")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG -fdebug-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
## Add dependencies
set(SHARED_LINK_LIBS
metal
open_amp
)
## Add headers
include_directories(
${CMAKE_SOURCE_DIR}/library/include
)
## rpc support multi workers
if(DEFINED MULTI_WORKERS)
add_definitions(-DMULTI_WORKERS)
endif()
## build MICA library
set(MICA_LIB mica)
add_subdirectory(${CMAKE_SOURCE_DIR}/library)
## build MICA client
add_subdirectory(${CMAKE_SOURCE_DIR}/mica)
option(TEST_RING_BUFFER "Enable test ring buffer" OFF)
## build testcase for debugging module
if (DEFINED TEST_RING_BUFFER)
add_definitions(-DTEST_RING_BUFFER)
add_subdirectory(${CMAKE_SOURCE_DIR}/test/test_ring_buffer)
endif()
add_subdirectory(${CMAKE_SOURCE_DIR}/test/send-data/)