From 0fc39343ff3f995148265b6eda45efe53b49bab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Tue, 16 Oct 2018 13:25:04 +0200 Subject: [PATCH] cmake: Export the target name of the final elf file to the app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For the 'app' build scripts to be able to do post-processing on the elf file they need to know what the target name for the elf file is. In zephyr this name varies depending on whether one does a single or multiple link, so we export a variable with the name. Signed-off-by: Sebastian Bøe --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34fd1c975f8..8f893b5400a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1166,6 +1166,10 @@ else() # generation stage. endif() +# Export the variable to the application's scope to allow the +# application to know what the name of the final elf target is. +set(logical_target_for_zephyr_elf ${logical_target_for_zephyr_elf} PARENT_SCOPE) + # To avoid having the same logical target name for the zephyr lib and # the zephyr elf, we set the kernel_elf file name to zephyr.elf. set_target_properties(${logical_target_for_zephyr_elf} PROPERTIES OUTPUT_NAME ${KERNEL_NAME})