mirror of https://github.com/ARMmbed/mbed-os.git
CMake: Set TARGET_NAME macro
The C/C++ macro `TARGET_NAME` allows code to print the current target's name, e.g. in error reporting when a fault happens. This macro is exported by Mbed CLI 1 and used by mbed_error.c, so for compatibility we let CMake set the same name of macro. Fixes ARMmbed/mbed-tools#313pull/15041/head
parent
be31d50cc4
commit
aca2d630ce
|
@ -101,6 +101,7 @@ if(${CMAKE_CROSSCOMPILING})
|
|||
|
||||
target_compile_definitions(mbed-core
|
||||
INTERFACE
|
||||
TARGET_NAME=${MBED_TARGET}
|
||||
${MBED_TARGET_DEFINITIONS}
|
||||
${MBED_CONFIG_DEFINITIONS}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue