Skip to content

Commit

Permalink
Merge pull request #272 from lf-lang/zephyr-dont-link-with-thread
Browse files Browse the repository at this point in the history
Do not link with thread library when we are compiling for Zephyr
  • Loading branch information
erlingrj authored Sep 16, 2023
2 parents bfae633 + 7e031ec commit c0da6ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ if(DEFINED _LF_CLOCK_SYNC_ON)
endif()
endif()

# Link with thread library
# Link with thread library, unless if we are targeting the Zephyr RTOS
if(DEFINED LF_THREADED OR DEFINED LF_TRACE)
find_package(Threads REQUIRED)
target_link_libraries(core PUBLIC Threads::Threads)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Zephyr")
find_package(Threads REQUIRED)
target_link_libraries(core PUBLIC Threads::Threads)
endif()
endif()

# Macro for translating a command-line argument into compile definition for
Expand Down

0 comments on commit c0da6ab

Please sign in to comment.