@@ -13,14 +13,36 @@ cmake_minimum_required(VERSION 3.15)
13
13
14
14
# `freertos_config` target defines the path to FreeRTOSConfig.h and optionally other freertos based config files
15
15
if (NOT TARGET freertos_config )
16
- message (FATAL_ERROR " freertos_config target not specified. Please specify a cmake target that defines the include directory for FreeRTOSConfig.h:\n "
17
- " add_library(freertos_config INTERFACE)\n "
18
- " target_include_directories(freertos_config SYSTEM\n "
19
- " INTERFACE\n "
20
- " include) # The config file directory\n "
21
- " target_compile_definitions(freertos_config\n "
22
- " PUBLIC\n "
23
- " projCOVERAGE_TEST=0)\n " )
16
+ if (NOT DEFINED FREERTOS_CONFIG_FILE_DIRECTORY )
17
+
18
+ message (FATAL_ERROR " freertos_config target not specified. Please specify a cmake target that defines the include directory for FreeRTOSConfig.h:\n "
19
+ " add_library(freertos_config INTERFACE)\n "
20
+ " target_include_directories(freertos_config SYSTEM\n "
21
+ " INTERFACE\n "
22
+ " include) # The config file directory\n "
23
+ " target_compile_definitions(freertos_config\n "
24
+ " PUBLIC\n "
25
+ " projCOVERAGE_TEST=0)\n " )
26
+ else ()
27
+ message (WARNING " Using deprecated 'FREERTOS_CONFIG_FILE_DIRECTORY' - please update your project CMakeLists.txt file:\n "
28
+ " add_library(freertos_config INTERFACE)\n "
29
+ " target_include_directories(freertos_config SYSTEM\n "
30
+ " INTERFACE\n "
31
+ " include) # The config file directory\n "
32
+ " target_compile_definitions(freertos_config\n "
33
+ " PUBLIC\n "
34
+ " 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
+ )
45
+ endif ()
24
46
endif ()
25
47
26
48
# Heap number or absolute path to custom heap implementation provided by user
0 commit comments