mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 20:21:04 +00:00
esptool_py: add missing phony build targets for CMake
Adds targets erase_flash and monitor for users not using idf.py. Closes https://github.com/espressif/esp-idf/issues/2420.
This commit is contained in:
15
components/esptool_py/run_cmd.cmake
Normal file
15
components/esptool_py/run_cmd.cmake
Normal file
@@ -0,0 +1,15 @@
|
||||
if(NOT IDF_PATH)
|
||||
message(FATAL_ERROR "IDF_PATH not set.")
|
||||
endif()
|
||||
include("${IDF_PATH}/tools/cmake/utilities.cmake")
|
||||
spaces2list(CMD)
|
||||
|
||||
execute_process(COMMAND ${CMD}
|
||||
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
||||
if(${result})
|
||||
# No way to have CMake silently fail, unfortunately
|
||||
message(FATAL_ERROR "${TOOL} failed")
|
||||
endif()
|
Reference in New Issue
Block a user