File tree 5 files changed +5
-40
lines changed
5 files changed +5
-40
lines changed Original file line number Diff line number Diff line change @@ -192,12 +192,16 @@ target_link_options(DEFAULT_KERNEL_LINK_OPTIONS INTERFACE
192
192
193
193
add_library (DEFAULT_KERNEL_LINK_LIB INTERFACE )
194
194
target_link_libraries (DEFAULT_KERNEL_LINK_LIB INTERFACE
195
+ COMMON_COMPILE_OPTIONS
196
+ COMMON_LINK_OPTIONS
195
197
COMMON_LINK_LIB
198
+ COMMON_DEFINITIONS
199
+ DEFAULT_KERNEL_DEFINITIONS
200
+ DEFAULT_KERNEL_COMPILE_OPTIONS
196
201
DEFAULT_KERNEL_LINK_OPTIONS
197
202
198
203
printf_bare_metal
199
204
dtc-lib
200
- COMMON_COMPILE_OPTIONS
201
205
202
206
$<$<STREQUAL :${CMAKE_SYSTEM_PROCESSOR} ,riscv64>:
203
207
opensbi_interface
Original file line number Diff line number Diff line change @@ -28,21 +28,6 @@ target_include_directories(kernel PRIVATE
28
28
include
29
29
)
30
30
31
- # 添加定义
32
- target_compile_definitions (${PROJECT_NAME} PRIVATE
33
- ${DEFAULT_KERNEL_DEFINITIONS}
34
- )
35
-
36
- # 添加编译参数
37
- target_compile_options (${PROJECT_NAME} PRIVATE
38
- ${DEFAULT_KERNEL_COMPILE_OPTIONS}
39
- )
40
-
41
- # 添加链接参数
42
- target_link_options (${PROJECT_NAME} PRIVATE
43
- ${DEFAULT_KERNEL_LINK_OPTIONS}
44
- )
45
-
46
31
# 添加要链接的库
47
32
target_link_libraries (${PROJECT_NAME} PRIVATE
48
33
DEFAULT_KERNEL_LINK_LIB
Original file line number Diff line number Diff line change @@ -27,14 +27,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE
27
27
${CMAKE_SOURCE_DIR} /src/kernel/arch/${CMAKE_SYSTEM_PROCESSOR} /include
28
28
)
29
29
30
- target_compile_options (${PROJECT_NAME} PRIVATE
31
- ${DEFAULT_KERNEL_COMPILE_OPTIONS}
32
- )
33
-
34
- target_link_options (${PROJECT_NAME} PRIVATE
35
- ${DEFAULT_KERNEL_LINK_OPTIONS}
36
- )
37
-
38
30
target_link_libraries (${PROJECT_NAME} PRIVATE
39
31
DEFAULT_KERNEL_LINK_LIB
40
32
libc
Original file line number Diff line number Diff line change @@ -22,14 +22,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE
22
22
${CMAKE_SOURCE_DIR} /src/kernel/arch/${CMAKE_SYSTEM_PROCESSOR} /include
23
23
)
24
24
25
- target_compile_options (${PROJECT_NAME} PRIVATE
26
- ${DEFAULT_KERNEL_COMPILE_OPTIONS}
27
- )
28
-
29
- target_link_options (${PROJECT_NAME} PRIVATE
30
- ${DEFAULT_KERNEL_LINK_OPTIONS}
31
- )
32
-
33
25
target_link_libraries (${PROJECT_NAME} PRIVATE
34
26
DEFAULT_KERNEL_LINK_LIB
35
27
libc
Original file line number Diff line number Diff line change @@ -18,14 +18,6 @@ add_executable(${PROJECT_NAME}
18
18
${CMAKE_SOURCE_DIR} /src/kernel/arch/${CMAKE_SYSTEM_PROCESSOR} /boot.S
19
19
)
20
20
21
- target_compile_options (${PROJECT_NAME} PRIVATE
22
- ${DEFAULT_KERNEL_COMPILE_OPTIONS}
23
- )
24
-
25
- target_link_options (${PROJECT_NAME} PRIVATE
26
- ${DEFAULT_KERNEL_LINK_OPTIONS}
27
- )
28
-
29
21
# 添加要链接的库
30
22
target_link_libraries (${PROJECT_NAME} PRIVATE
31
23
DEFAULT_KERNEL_LINK_LIB
You can’t perform that action at this time.
0 commit comments