Skip to content

Commit b2c564c

Browse files
committed
Only adding freertos_config if it exists. Removing auto generation of it from a FREERTOS_CONFIG_FILE_DIRECTORY.
1 parent 2310f17 commit b2c564c

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

CMakeLists.txt

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ cmake_minimum_required(VERSION 3.15)
66
# User is responsible for one library target:
77
# freertos_config ,typcially an INTERFACE library
88
#
9+
# DEPRECATED: FREERTOS_CONFIG_FILE_DIRECTORY - but still supported if no freertos_config defined for now.
10+
# May be removed at some point in the future.
911
# User can choose which heap implementation to use (either the implementations
1012
# included with FreeRTOS [1..5] or a custom implementation ) by providing the
1113
# option FREERTOS_HEAP. If the option is not set, the cmake will default to
@@ -32,16 +34,6 @@ if(NOT TARGET freertos_config )
3234
" target_compile_definitions(freertos_config\n"
3335
" PUBLIC\n"
3436
" projCOVERAGE_TEST=0)\n")
35-
# Currently will add this in here.
36-
add_library(freertos_config INTERFACE)
37-
target_include_directories(freertos_config SYSTEM
38-
INTERFACE
39-
${FREERTOS_CONFIG_FILE_DIRECTORY}
40-
)
41-
target_compile_definitions(freertos_config
42-
PUBLIC
43-
projCOVERAGE_TEST=0
44-
)
4537
endif()
4638
endif()
4739

@@ -248,10 +240,12 @@ add_library(freertos_kernel STATIC
248240
target_include_directories(freertos_kernel
249241
PUBLIC
250242
include
243+
# Note: DEPRECATED but still supported, may be removed in a future release.
244+
$<$<NOT:$<TARGET_EXISTS:freertos_config>>:${FREERTOS_CONFIG_FILE_DIRECTORY}>
251245
)
252246

253247
target_link_libraries(freertos_kernel
254248
PUBLIC
255-
freertos_config
249+
$<$<TARGET_EXISTS:freertos_config>:freertos_config>
256250
freertos_kernel_port
257251
)

0 commit comments

Comments
 (0)