mirror of https://github.com/ARMmbed/mbed-os.git
CMake: pass application name to post-build hook
Pass the exact name to the post-build hook, when an application's or test's `CMakeLists.txt` calls `mbed_set_post_build()`. The interface is CMake's built-in mechanism: * `set_target_properties()` to set a property, e.g. application name * `$<TARGET_PROPERTY:target,property>` to query a property at run timepull/14378/head
parent
3579bb65da
commit
ad27a3ec69
|
@ -177,6 +177,12 @@ function(mbed_generate_bin_hex target)
|
||||||
# through the post-build process once.
|
# through the post-build process once.
|
||||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${target}.elf)
|
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${target}.elf)
|
||||||
|
|
||||||
|
# Pass the application's name to the Mbed target's post build operation
|
||||||
|
set_target_properties(mbed-post-build-bin-${MBED_TARGET}
|
||||||
|
PROPERTIES
|
||||||
|
application ${target}
|
||||||
|
)
|
||||||
|
|
||||||
# The artefacts must be created before they can be further manipulated
|
# The artefacts must be created before they can be further manipulated
|
||||||
add_dependencies(mbed-post-build-bin-${MBED_TARGET} ${target})
|
add_dependencies(mbed-post-build-bin-${MBED_TARGET} ${target})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue