File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -136,9 +136,22 @@ function(mbed_set_post_build target)
136136 if (NOT MBED_IS_STANDALONE)
137137 if ("${ARGN} " STREQUAL "" )
138138 get_target_property (POST_BUILD_TARGET_LINK_LIBRARIES ${target} LINK_LIBRARIES )
139+ get_target_property (MBED_APPLICATION_PROFILE_FLAGS_TARGET_LINK_LIBRARIES mbed-application-profile-flags INTERFACE_LINK_LIBRARIES)
139140 if ("mbed-os" IN_LIST POST_BUILD_TARGET_LINK_LIBRARIES)
141+ if (NOT "mbed-rtos-flags" IN_LIST MBED_APPLICATION_PROFILE_FLAGS_TARGET_LINK_LIBRARIES)
142+ message (FATAL_ERROR
143+ " Miamatch of link libraries in Target ${target} : mbed-os without mbed-rtos-flags\n "
144+ " Check target config option application-profile"
145+ )
146+ endif ()
140147 get_target_property (LINKER_SCRIPT_PATH mbed-os LINKER_SCRIPT_PATH)
141148 elseif ("mbed-baremetal" IN_LIST POST_BUILD_TARGET_LINK_LIBRARIES)
149+ if ("mbed-rtos-flags" IN_LIST MBED_APPLICATION_PROFILE_FLAGS_TARGET_LINK_LIBRARIES)
150+ message (FATAL_ERROR
151+ " Miamatch of link libraries in Target ${target} : mbed-baremetal with mbed-rtos-flags\n "
152+ " Check target config option application-profile"
153+ )
154+ endif ()
142155 get_target_property (LINKER_SCRIPT_PATH mbed-baremetal LINKER_SCRIPT_PATH)
143156 else ()
144157 message (FATAL_ERROR "Target ${target} used with mbed_set_post_build() but does not link to mbed-os or mbed-baremetal!" )
You can’t perform that action at this time.
0 commit comments