Commit 9cebf732 authored by Yuval Peress's avatar Yuval Peress Committed by Carles Cufi
Browse files

unittest: Only add main.c if it exists



Downstream it's easier to write tests that use target_sources after
including the unittest package instead of specifying a list of sources
before. But if we do that, currently, main.c is added and the build
breaks because it doesn't exist.

Signed-off-by: default avatarYuval Peress <peress@google.com>
parent bea16cae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ if((NOT DEFINED ZEPHYR_BASE) AND (DEFINED ENV_ZEPHYR_BASE))
  set(ZEPHYR_BASE ${ENV_ZEPHYR_BASE} CACHE PATH "Zephyr base")
endif()

if(NOT SOURCES)
if(NOT SOURCES AND EXISTS main.c)
  set(SOURCES main.c)
endif()