~aleteoryx/muditaos

ref: sign_test muditaos/module-os/CMakeLists.txt -rw-r--r-- 1.9 KiB
a217eeb3 — Dawid Wojtas [BH-2024] Fix lack of alarm directory after updating software 1 year, 5 months ago
                                                                                
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
project(module-os VERSION 1.0
        DESCRIPTION "OS module library")

add_library(${PROJECT_NAME} STATIC

        RTOSWrapper/ccondition_variable.cpp
        RTOSWrapper/cevent_groups.cpp
        RTOSWrapper/cmem_pool.cpp
        RTOSWrapper/cmutex.cpp
        RTOSWrapper/cqueue.cpp
        RTOSWrapper/cread_write_lock.cpp
        RTOSWrapper/csemaphore.cpp
        RTOSWrapper/ctasklet.cpp
        RTOSWrapper/cthread.cpp
        RTOSWrapper/ctickhook.cpp
        RTOSWrapper/ctimer.cpp
        RTOSWrapper/cworkqueue.cpp

        memory/usermem.c

        LockGuard.cpp
        CriticalSectionGuard.cpp

        $<$<BOOL:${PROF_ON}>:prof/prof.c>

        trace/DeletedTasks.cpp
        )

# Board specific compilation definitions,options,include directories and features
target_compile_definitions(${PROJECT_NAME} PUBLIC ${PROJECT_CONFIG_DEFINITIONS})
target_compile_definitions(${PROJECT_NAME} PUBLIC ${PROJECT_TARGET})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_INCLUDES})

target_compile_definitions(${PROJECT_NAME}

        PUBLIC

        CPP_FREERTOS_CONDITION_VARIABLES
        )

# enforce no optimization for RelWithDebInfo configuration to debug system memory
if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
    set_source_files_properties(memory/usermem.c PROPERTIES COMPILE_OPTIONS "-O0")
endif ()

target_include_directories(${PROJECT_NAME}

        PUBLIC

        ${CMAKE_CURRENT_SOURCE_DIR}

        RTOSWrapper/include
        prof
        trace

        )

#Add FreeRTOS SystemvView headers if enabled
if ((${PROJECT_TARGET} STREQUAL "TARGET_RT1051") AND (${SYSTEM_VIEW_ENABLED}))
    target_link_libraries(${PROJECT_NAME} PUBLIC segger::systemview)
endif ()

target_link_libraries(${PROJECT_NAME} PUBLIC log-api board-config freertos_kernel)


add_library(freertos-app application.c trace/DeletedTasks.cpp)
target_link_libraries(freertos-app PRIVATE freertos_kernel log-api)

if (${ENABLE_TESTS})
    add_subdirectory(test)
endif ()