Skip to content

Commit

Permalink
ESP32: Fix building chip_gn for cmake v3.31.x and onwards (#36606)
Browse files Browse the repository at this point in the history
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 authored Nov 22, 2024
1 parent 04e6a68 commit d27a099
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 @@ -389,7 +389,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 d27a099

Please sign in to comment.