mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(cmakev2): Create executable dummy source only if it does not exist
idf_build_executable() creates a dummy source file to create the executable target. Since this file is created unconditionally everytime CMake configuration happens, a source file change is registered which causes CMake to execute other targets even though no other source file changed.
This commit is contained in:
committed by
Frantisek Hrbata
parent
859bcacd29
commit
c3881a0631
@@ -527,7 +527,9 @@ function(idf_build_executable executable)
|
||||
idf_build_library(${library} COMPONENTS "${ARG_COMPONENTS}")
|
||||
|
||||
set(executable_src ${CMAKE_BINARY_DIR}/executable_${executable}.c)
|
||||
file(TOUCH "${executable_src}")
|
||||
if(NOT EXISTS "${executable_src}")
|
||||
file(TOUCH "${executable_src}")
|
||||
endif()
|
||||
add_executable(${executable} "${executable_src}")
|
||||
|
||||
if(ARG_NAME)
|
||||
|
||||
Reference in New Issue
Block a user