Skip to content

Commit

Permalink
[ESP32] Do not use --fail-on-unused-args flag when using pregenerated (
Browse files Browse the repository at this point in the history
…#27654)

files
  • Loading branch information
shubhamdp authored and pull[bot] committed Feb 9, 2024
1 parent 7c9ab3c commit 2741618
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,21 @@ if(CONFIG_ENABLE_PW_RPC)
list(APPEND chip_libraries "${CMAKE_CURRENT_BINARY_DIR}/lib/libPwRpc.a")
endif()

# When using the pregenerated files, there is a edge case where an error appears for
# undeclared argument chip_code_pre_generated_directory. To get around with it we are
# disabling the --fail-on-unused-args flag.
# For more, see: https://github.com/project-chip/connectedhomeip/issues/27636
if (CHIP_CODEGEN_PREGEN_DIR)
set(GN_CONFIGURE_COMMAND ${GN_EXECUTABLE} --root=${GN_ROOT_TARGET} gen --check ${CMAKE_CURRENT_BINARY_DIR})
else ()
set(GN_CONFIGURE_COMMAND ${GN_EXECUTABLE} --root=${GN_ROOT_TARGET} gen --check --fail-on-unused-args ${CMAKE_CURRENT_BINARY_DIR})
endif ()

externalproject_add(
chip_gn
SOURCE_DIR ${CHIP_ROOT}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
CONFIGURE_COMMAND ${GN_EXECUTABLE} --root=${GN_ROOT_TARGET} gen --check --fail-on-unused-args ${CMAKE_CURRENT_BINARY_DIR}
CONFIGURE_COMMAND ${GN_CONFIGURE_COMMAND}
BUILD_COMMAND ninja "esp32"
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${chip_libraries}
Expand Down

0 comments on commit 2741618

Please sign in to comment.