mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
cmake: use built-in file function to create dummy main
This commit is contained in:
parent
c4b0f00985
commit
d928465151
@ -154,10 +154,7 @@ function(idf_add_executable)
|
||||
# Create a dummy file to work around CMake requirement of having a source
|
||||
# file while adding an executable
|
||||
add_executable(${exe_target} "${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c")
|
||||
add_custom_command(OUTPUT dummy_main_src.c
|
||||
COMMAND echo "" > dummy_main_src.c
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
VERBATIM)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c)
|
||||
|
||||
add_custom_target(dummy_main_src DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user