Skip to content
Commit d268f82f authored by Joakim Andersson's avatar Joakim Andersson Committed by Kumar Gala
Browse files

cmake: Add generated files to zephyr_interface dependency target



Fix race condition in build when creating libraries in application and
depending on zephyr_interface.

lib/CMakeLists.txt:

    add_library(lib STATIC src/lib.c)
    zephyr_append_cmake_library(lib)
    target_link_libraries(lib PUBLIC zephyr_interface)

Gives following error message:

  from path/src/lib.c:6:
  zephyr/include/syscall.h:11:10: fatal error: syscall_list.h: \
  	No such file or directory
     11 | #include <syscall_list.h>
        |          ^~~~~~~~~~~~~~~~
  compilation terminated.
  [13/165] Generating include/generated/syscall_dispatch.c, \
  	include/generated/syscall_list.h

Signed-off-by: default avatarJoakim Andersson <joakim.andersson@nordicsemi.no>
parent 08d2f48d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment