1818import os
1919from project_generator_definitions .definitions import ProGenDef
2020
21- from tools .export .exporters import Exporter
21+ from tools .export .exporters import Exporter , ExporterTargetsProperty
2222from tools .targets import TARGET_MAP , TARGET_NAMES
2323
2424# If you wish to add a new target, add it to project_generator_definitions, and then
@@ -35,19 +35,19 @@ class IAREmbeddedWorkbench(Exporter):
3535
3636 MBED_CONFIG_HEADER_SUPPORTED = True
3737
38- @property
39- def TARGETS (self ):
40- if not hasattr (self , "_targets_supported" ):
41- self ._targets_supported = []
38+ @ExporterTargetsProperty
39+ def TARGETS (cls ):
40+ if not hasattr (cls , "_targets_supported" ):
41+ cls ._targets_supported = []
4242 for target in TARGET_NAMES :
4343 try :
4444 if (ProGenDef ('iar' ).is_supported (str (TARGET_MAP [target ])) or
4545 ProGenDef ('iar' ).is_supported (TARGET_MAP [target ].progen ['target' ])):
46- self ._targets_supported .append (target )
46+ cls ._targets_supported .append (target )
4747 except AttributeError :
4848 # target is not supported yet
4949 continue
50- return self ._targets_supported
50+ return cls ._targets_supported
5151
5252 def generate (self , progen_build = False ):
5353 """ Generates the project files """
0 commit comments