summaryrefslogtreecommitdiff
path: root/ports/linux/gnu/CMakeLists.txt
blob: 17138044f899d2673995ea118e314ffad747c933 (plain)
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

target_sources(${PROJECT_NAME}
    PRIVATE
    # {{BEGIN_TARGET_SOURCES}}
	${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_low_level.c
	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.c
	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.c
	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.c
	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.c
	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.c
	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.c
	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.c

    # {{END_TARGET_SOURCES}}
)

target_include_directories(${PROJECT_NAME}
    SYSTEM
    PUBLIC
    ${CMAKE_CURRENT_LIST_DIR}/inc
)

target_compile_definitions(${PROJECT_NAME} PUBLIC "-D_GNU_SOURCE -DTX_LINUX_DEBUG_ENABLE")

# The demo program beside the port. Off by default so the ordinary build
# produces just the library; -DTHREADX_SAMPLE=ON adds the sample_threadx target.
option(THREADX_SAMPLE "Build the sample program for this port" OFF)
if(THREADX_SAMPLE)
    add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/example_build)
endif()