build: fix linker scripts edition not triggering a rebuild

Fix the dependencies in CMakeLists files for triggering a relink
when linker script file is modified.
This commit is contained in:
Omar Chebib
2021-03-01 12:30:50 +08:00
committed by bot
parent c4fa75e62c
commit 5371231935
5 changed files with 18 additions and 4 deletions

View File

@@ -58,7 +58,8 @@ else()
add_custom_command(
OUTPUT esp32c3_out.ld
COMMAND "${CMAKE_C_COMPILER}" -C -P -x c -E -o esp32c3_out.ld -I ${config_dir} ${LD_DIR}/esp32c3.ld
MAIN_DEPENDENCY ${LD_DIR}/esp32c3.ld ${sdkconfig_header}
MAIN_DEPENDENCY ${LD_DIR}/esp32c3.ld
DEPENDS ${sdkconfig_header}
COMMENT "Generating linker script..."
VERBATIM)