From 55e3ab79cb1a67cf7d21c6a1751608e5ab1a84fd Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Mon, 22 Mar 2021 15:44:48 +0100 Subject: [PATCH] cmake: removing map file from BYPRODUCTS as it is being renamed Fixes: #33512 The ${ZEPHYR_FINAL_EXECUTABLE}.map file is being renamed at a later stage. The renamed, and thus missing file, causes ninja to relink the target in order to re-create the map file, which then again is renamed. This is fixed by removing the ${ZEPHYR_FINAL_EXECUTABLE}.map as a byproduct and only has the byproduct on the renamed file to ensure proper cleanup, see: #23449. Signed-off-by: Torsten Rasmussen --- CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d4671555a2..850cf7ee5d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1118,9 +1118,6 @@ else() LIBRARIES_POST_SCRIPT "" DEPENDENCIES ${CODE_RELOCATION_DEP} ) - target_byproducts(TARGET ${ZEPHYR_FINAL_EXECUTABLE} - BYPRODUCTS ${PROJECT_BINARY_DIR}/${ZEPHYR_FINAL_EXECUTABLE}.map - ) set_property(TARGET ${ZEPHYR_FINAL_EXECUTABLE} PROPERTY LINK_DEPENDS ${PROJECT_BINARY_DIR}/linker.cmd) add_dependencies( ${ZEPHYR_FINAL_EXECUTABLE} linker_zephyr_final_script_target)