| 
									
										
										
										
											2021-08-11 15:22:50 +08:00
										 |  |  | idf_build_get_property(target IDF_TARGET)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-10 18:40:01 +11:00
										 |  |  | set(srcs | 
					
						
							| 
									
										
										
										
											2020-08-10 12:29:05 +08:00
										 |  |  |     "unity/src/unity.c")
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set(includes | 
					
						
							|  |  |  |     "include"
 | 
					
						
							|  |  |  |     "unity/src")
 | 
					
						
							| 
									
										
										
										
											2018-10-25 12:52:32 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-19 15:37:39 +08:00
										 |  |  | set(requires "")
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-29 17:06:21 +08:00
										 |  |  | if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL)
 | 
					
						
							|  |  |  |     list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv")
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-25 12:52:32 +08:00
										 |  |  | if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER)
 | 
					
						
							| 
									
										
										
										
											2019-04-28 15:38:23 +08:00
										 |  |  |     list(APPEND srcs "unity_runner.c")
 | 
					
						
							| 
									
										
										
										
											2022-03-31 18:16:19 +08:00
										 |  |  |     # Note the following files are not compatible with the Linux target.
 | 
					
						
							|  |  |  |     # On Linux, these are masked because we also don't use the IDF test runner there
 | 
					
						
							| 
									
										
										
										
											2022-08-06 14:52:22 +08:00
										 |  |  |     list(APPEND srcs "unity_utils_freertos.c" "unity_utils_cache.c")
 | 
					
						
							| 
									
										
										
										
											2022-03-31 18:16:19 +08:00
										 |  |  |     list(APPEND requires "freertos")
 | 
					
						
							| 
									
										
										
										
											2018-10-25 12:52:32 +08:00
										 |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if(CONFIG_UNITY_ENABLE_FIXTURE)
 | 
					
						
							| 
									
										
										
										
											2019-04-28 15:38:23 +08:00
										 |  |  |     list(APPEND srcs "unity/extras/fixture/src/unity_fixture.c")
 | 
					
						
							| 
									
										
										
										
											2020-08-10 12:29:05 +08:00
										 |  |  |     list(APPEND includes "unity/extras/fixture/src")
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-31 18:16:19 +08:00
										 |  |  | list(APPEND srcs "unity_utils_memory.c")
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-11 15:22:50 +08:00
										 |  |  | if(NOT "${target}" STREQUAL "linux")
 | 
					
						
							| 
									
										
										
										
											2020-08-10 12:29:05 +08:00
										 |  |  |     list(APPEND srcs "unity_port_esp32.c")
 | 
					
						
							| 
									
										
										
										
											2022-03-31 18:16:19 +08:00
										 |  |  |     list(APPEND srcs "port/esp/unity_utils_memory_esp.c")
 | 
					
						
							|  |  |  | else()
 | 
					
						
							| 
									
										
										
										
											2022-08-15 18:09:45 +02:00
										 |  |  |     list(APPEND srcs "unity_port_linux.c")
 | 
					
						
							| 
									
										
										
										
											2022-03-31 18:16:19 +08:00
										 |  |  |     list(APPEND srcs "port/linux/unity_utils_memory_linux.c")
 | 
					
						
							| 
									
										
										
										
											2018-10-25 12:52:32 +08:00
										 |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-28 15:38:23 +08:00
										 |  |  | idf_component_register(SRCS "${srcs}" | 
					
						
							| 
									
										
										
										
											2021-07-19 15:37:39 +08:00
										 |  |  |                     INCLUDE_DIRS ${includes}
 | 
					
						
							|  |  |  |                     REQUIRES ${requires})
 | 
					
						
							| 
									
										
										
										
											2018-10-25 12:52:32 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-06 14:52:22 +08:00
										 |  |  | if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER)
 | 
					
						
							|  |  |  |     idf_component_optional_requires(PRIVATE spi_flash)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-15 18:09:45 +02:00
										 |  |  | target_compile_definitions(${COMPONENT_LIB} PUBLIC | 
					
						
							|  |  |  |     -DUNITY_INCLUDE_CONFIG_H
 | 
					
						
							|  |  |  | )
 | 
					
						
							| 
									
										
										
										
											2018-10-25 12:52:32 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-05 12:20:26 +01:00
										 |  |  | target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-const-variable)
 |