esp-idf/tools/mocks/freertos/CMakeLists.txt
Jakob Hasse bfbbd9d790 feat(freertos): Added FreeRTOS POSIX/Linux Simulator
* Added port layer from the FreeRTOS POSIX port, added
  additional port code for ESP-IDF.
* Created another hello world example using that POSIX
  port in tools/test_apps.
* Removed old linux app
2022-09-27 16:23:54 +02:00

26 lines
1.1 KiB
CMake

# NOTE: This kind of mocking currently works on Linux targets only.
# On Espressif chips, too many dependencies are missing at the moment.
message(STATUS "building FREERTOS MOCKS (only task, event-groups and queue)")
idf_component_get_property(original_freertos_dir freertos COMPONENT_OVERRIDEN_DIR)
set(kernel_dir "${original_freertos_dir}/FreeRTOS-Kernel")
set(include_dirs
"${kernel_dir}/include"
"${original_freertos_dir}/esp_additions/include"
"${original_freertos_dir}/esp_additions/include/freertos"
"${kernel_dir}/portable/linux/include" # For FreeRTOSConfig_arch.h
"${kernel_dir}/include/freertos" # this is due to the way includes are generated in CMock (without freertos prefix)
)
idf_component_mock(INCLUDE_DIRS ${include_dirs}
REQUIRES esp_common
MOCK_HEADER_FILES
${original_freertos_dir}/FreeRTOS-Kernel/include/freertos/task.h
${original_freertos_dir}/FreeRTOS-Kernel/include/freertos/event_groups.h
${original_freertos_dir}/FreeRTOS-Kernel/include/freertos/queue.h)
idf_component_get_property(freertos_lib freertos COMPONENT_LIB)
target_compile_definitions(${freertos_lib} PUBLIC "projCOVERAGE_TEST=0")