Merge branch 'bugfix/cmake_create_dummy_main_windows' into 'master'

cmake: use built-in file function to create dummy main

See merge request idf/esp-idf!3253
This commit is contained in:
Ivan Grokhotkov 2018-09-14 15:18:36 +08:00
commit d56a400709

View File

@ -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)