Skip to content

Commit

Permalink
ESP32: Fix building chip_gn for cmake v3.31.x and onwards (project-ch…
Browse files Browse the repository at this point in the history
…ip#36606)

remove the WORKING_DIRECTORY from chip_gn target

For cmake v3.31.x, custom command generated for chip_gn-build in
build.ninja concats the $WORKING_DIRECTORY and $BUILD_DIR paths and
it mess up the chip_gn step when building example.
    COMMAND = cd "/Users/account/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip;/Users/account/esp-matter/examples/light/build/esp-idf/chip" && ninja esp32

For cmake version prior to v3.31, it do not prepend the
$WORKING_DIRECTORY path.
    COMMAND = cd /Users/account/esp-matter/examples/light/build/esp-idf/chip && ninja esp32

This could be becuase of Kitware/CMake@f5f8030

related issue - espressif/esp-matter#1157
  • Loading branch information
shubhamdp committed Nov 25, 2024
1 parent 3c36729 commit 46b9b5a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ externalproject_add(
BUILD_COMMAND ninja "esp32"
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${chip_libraries}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS args_gn
BUILD_ALWAYS 1
)
Expand Down

0 comments on commit 46b9b5a

Please sign in to comment.