diff --git a/CMakeLists.txt b/CMakeLists.txt index 2de73b77f0..f7d82081c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,6 +155,7 @@ add_subdirectory(cmsis/device/rtos EXCLUDE_FROM_ALL) target_link_options(mbed-core INTERFACE $) # Expose include directories. cmsis.h/device.h and other headers are required by libraries or applications target_include_directories(mbed-core INTERFACE $) +target_compile_definitions(mbed-core INTERFACE $) # Some of core files require MBED_CONF_RTOS_PRESENT symbol. For baremetal, it's sufficient to link with mbed-core (symbol undefined = RTOS not present). For Mbed OS, this symbol must be defined and set, therefore we copy sources and build them together with this flag get_property(MBED_CORE_SOURCES TARGET mbed-core-obj PROPERTY SOURCES)