File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -136,9 +136,20 @@ 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_CORE_FLAGS_TARGET_LINK_LIBRARIES mbed-core-flags  INTERFACE_LINK_LIBRARIES)
139140            if ("mbed-os"  IN_LIST  POST_BUILD_TARGET_LINK_LIBRARIES)
141+                 if (NOT  "mbed-rtos-flags"  IN_LIST  MBED_CORE_FLAGS_TARGET_LINK_LIBRARIES)
142+                     message (FATAL_ERROR
143+                         "Miamatch of link libraries in Target ${target} : mbed-os without mbed-rtos-flags. Check target.application-profile setting." 
144+                     )
145+                 endif ()
140146                get_target_property (LINKER_SCRIPT_PATH mbed-os LINKER_SCRIPT_PATH)
141147            elseif ("mbed-baremetal"  IN_LIST  POST_BUILD_TARGET_LINK_LIBRARIES)
148+                 if ("mbed-rtos-flags"  IN_LIST  MBED_CORE_FLAGS_TARGET_LINK_LIBRARIES)
149+                     message (FATAL_ERROR
150+                         " Miamatch of link libraries in Target ${target} : mbed-baremetal with mbed-rtos-flags. Check target.application-profile setting." 
151+                     )
152+                 endif ()
142153                get_target_property (LINKER_SCRIPT_PATH mbed-baremetal LINKER_SCRIPT_PATH)
143154            else ()
144155                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