1function(target_sources_if_not_overridden filename)
2    list(FIND TX_SRC_OVERRIDES ${filename} OVERRIDE_FOUND)
3    if( OVERRIDE_FOUND EQUAL -1 )
4        # message(STATUS "** Using original ${filename} from common/src **")
5        target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src/${filename})
6    endif()
7endfunction()
8
9# These files can be overridden by setting them in the variable list named TX_SRC_OVERRIDES
10target_sources_if_not_overridden("tx_thread_delete.c")
11target_sources_if_not_overridden("tx_thread_reset.c")
12
13target_sources(${PROJECT_NAME}
14    PRIVATE
15    # {{BEGIN_TARGET_SOURCES}}
16	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_allocate.c
17	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_cleanup.c
18	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_create.c
19	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_delete.c
20	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_info_get.c
21	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_initialize.c
22	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_info_get.c
23	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_system_info_get.c
24	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_prioritize.c
25	${CMAKE_CURRENT_LIST_DIR}/src/tx_block_release.c
26	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_allocate.c
27	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_cleanup.c
28	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_create.c
29	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_delete.c
30	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_info_get.c
31	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_initialize.c
32	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_info_get.c
33	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_system_info_get.c
34	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_prioritize.c
35	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_search.c
36	${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_release.c
37	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_cleanup.c
38	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_create.c
39	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_delete.c
40	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_get.c
41	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_info_get.c
42	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_initialize.c
43	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_info_get.c
44	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_system_info_get.c
45	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set.c
46	${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set_notify.c
47	${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_high_level.c
48	${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_enter.c
49	${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_setup.c
50	${CMAKE_CURRENT_LIST_DIR}/src/tx_misra.c
51	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_cleanup.c
52	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_create.c
53	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_delete.c
54	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_get.c
55	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_info_get.c
56	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_initialize.c
57	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_info_get.c
58	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_system_info_get.c
59	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_prioritize.c
60	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_priority_change.c
61	${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_put.c
62	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_cleanup.c
63	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_create.c
64	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_delete.c
65	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_flush.c
66	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_front_send.c
67	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_info_get.c
68	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_initialize.c
69	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_info_get.c
70	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_system_info_get.c
71	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_prioritize.c
72	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_receive.c
73	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send.c
74	${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send_notify.c
75	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_ceiling_put.c
76	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_cleanup.c
77	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_create.c
78	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_delete.c
79	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_get.c
80	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_info_get.c
81	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_initialize.c
82	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_info_get.c
83	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_system_info_get.c
84	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_prioritize.c
85	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put.c
86	${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put_notify.c
87	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_create.c
88	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_entry_exit_notify.c
89	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_identify.c
90	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_info_get.c
91	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_initialize.c
92	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_info_get.c
93	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_system_info_get.c
94	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_preemption_change.c
95	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_priority_change.c
96	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_relinquish.c
97	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_resume.c
98	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_shell_entry.c
99	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_sleep.c
100	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_analyze.c
101	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_handler.c
102	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_notify.c
103	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_suspend.c
104	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_preempt_check.c
105	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_resume.c
106	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_suspend.c
107	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_terminate.c
108	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice.c
109	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice_change.c
110	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_timeout.c
111	${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_wait_abort.c
112	${CMAKE_CURRENT_LIST_DIR}/src/tx_time_get.c
113	${CMAKE_CURRENT_LIST_DIR}/src/tx_time_set.c
114	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_activate.c
115	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_change.c
116	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_create.c
117	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_deactivate.c
118	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_delete.c
119	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_expiration_process.c
120	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_info_get.c
121	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_initialize.c
122	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_info_get.c
123	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_system_info_get.c
124	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_activate.c
125	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_deactivate.c
126	${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_thread_entry.c
127	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_buffer_full_notify.c
128	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_disable.c
129	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_enable.c
130	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_filter.c
131	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_unfilter.c
132	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_initialize.c
133	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_interrupt_control.c
134	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_enter_insert.c
135	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_exit_insert.c
136	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_register.c
137	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_unregister.c
138	${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_user_event_insert.c
139	${CMAKE_CURRENT_LIST_DIR}/src/txe_block_allocate.c
140	${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_create.c
141	${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_delete.c
142	${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_info_get.c
143	${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_prioritize.c
144	${CMAKE_CURRENT_LIST_DIR}/src/txe_block_release.c
145	${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_allocate.c
146	${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_create.c
147	${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_delete.c
148	${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_info_get.c
149	${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_prioritize.c
150	${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_release.c
151	${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_create.c
152	${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_delete.c
153	${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_get.c
154	${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_info_get.c
155	${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set.c
156	${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set_notify.c
157	${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_create.c
158	${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_delete.c
159	${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_get.c
160	${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_info_get.c
161	${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_prioritize.c
162	${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_put.c
163	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_create.c
164	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_delete.c
165	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_flush.c
166	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_front_send.c
167	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_info_get.c
168	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_prioritize.c
169	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_receive.c
170	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send.c
171	${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send_notify.c
172	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_ceiling_put.c
173	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_create.c
174	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_delete.c
175	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_get.c
176	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_info_get.c
177	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_prioritize.c
178	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put.c
179	${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put_notify.c
180	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_create.c
181	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_delete.c
182	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_entry_exit_notify.c
183	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_info_get.c
184	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_preemption_change.c
185	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_priority_change.c
186	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_relinquish.c
187	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_reset.c
188	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_resume.c
189	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_suspend.c
190	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_terminate.c
191	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_time_slice_change.c
192	${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_wait_abort.c
193	${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_activate.c
194	${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_change.c
195	${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_create.c
196	${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_deactivate.c
197	${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_delete.c
198	${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_info_get.c
199
200    # {{END_TARGET_SOURCES}}
201)
202
203# Add the Common/inc directory to the project include list
204target_include_directories(${PROJECT_NAME}
205    SYSTEM
206    PUBLIC
207    ${CMAKE_CURRENT_LIST_DIR}/inc
208)
209
210