Added -x to pass SKU ID from command line
[people/mcb30/basetools.git] / Source / Python / Workspace / WorkspaceDatabase.py
index ea77d91..b016af7 100644 (file)
@@ -252,6 +252,10 @@ class DscBuildData(PlatformBuildClassObject):
                 self._SkuName = 'DEFAULT'\r
         return self._SkuName\r
 \r
+    def _SetSkuName(self, Value):\r
+        if Value in self.SkuIds:\r
+            self._SkuName = Value\r
+\r
     def _GetFdfFile(self):\r
         if self._FlashDefinition == None:\r
             RecordList = self._Table.Query(MODEL_META_DATA_HEADER, TAB_DSC_DEFINES_FLASH_DEFINITION, self.Arch)\r
@@ -863,7 +867,7 @@ class DscBuildData(PlatformBuildClassObject):
     OutputDirectory     = property(_GetOutpuDir)\r
     SupArchList         = property(_GetSupArch)\r
     BuildTargets        = property(_GetBuildTarget)\r
-    SkuName             = property(_GetSkuName)\r
+    SkuName             = property(_GetSkuName, _SetSkuName)\r
     FlashDefinition     = property(_GetFdfFile)\r
     BuildNumber         = property(_GetBuildNumber)\r
     MakefileName        = property(_GetMakefileName)\r