[Cmake-commits] [cmake-commits] zack.galbreath committed cmparseMSBuildXML.py 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Oct 27 11:35:40 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv19396

Modified Files:
	cmparseMSBuildXML.py 
Log Message:
BUG: hardcore some values so output matches cmVS10CLFlagTable.h (addresses bug #9753)


Index: cmparseMSBuildXML.py
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmparseMSBuildXML.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** cmparseMSBuildXML.py	23 Oct 2009 18:59:26 -0000	1.4
--- cmparseMSBuildXML.py	27 Oct 2009 15:35:37 -0000	1.5
***************
*** 218,226 ****
      toReturn = "static cmVS7FlagTable cmVS10CxxTable[] =\n{\n"
      toReturn += "\n  //Enum Properties\n"
      for i in self.enumProperties:
        for j in i.values:
!         toReturn+="  {\""+i.attributes["Name"]+"\", \""+j.attributes["Switch"]+"\",\n   \""+j.DisplayName+"\", \""+j.attributes["Name"]+"\", 0},\n"
        toReturn += "\n"
  
      
      toReturn += "\n  //Bool Properties\n"
--- 218,240 ----
      toReturn = "static cmVS7FlagTable cmVS10CxxTable[] =\n{\n"
      toReturn += "\n  //Enum Properties\n"
+     lastProp = {}
      for i in self.enumProperties:
+       if i.attributes["Name"] == "CompileAsManaged":
+         #write these out after the rest of the enumProperties
+         lastProp = i
+         continue
        for j in i.values:
!         #hardcore Brad King's manual fixes for cmVS10CLFlagTable.h
!         if i.attributes["Name"] == "PrecompiledHeader" and j.attributes["Switch"] != "":
!           toReturn+="  {\""+i.attributes["Name"]+"\", \""+j.attributes["Switch"]+"\",\n   \""+j.DisplayName+"\", \""+j.attributes["Name"]+"\",\n   cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},\n"
!         else:
!           #default (normal, non-hardcoded) case
!           toReturn+="  {\""+i.attributes["Name"]+"\", \""+j.attributes["Switch"]+"\",\n   \""+j.DisplayName+"\", \""+j.attributes["Name"]+"\", 0},\n"
        toReturn += "\n"
  
+     if lastProp != {}:
+       for j in lastProp.values:
+           toReturn+="  {\""+lastProp.attributes["Name"]+"\", \""+j.attributes["Switch"]+"\",\n   \""+j.DisplayName+"\", \""+j.attributes["Name"]+"\", 0},\n"
+       toReturn += "\n"
      
      toReturn += "\n  //Bool Properties\n"
***************
*** 252,256 ****
      for i in self.stringProperties:
        if i.attributes["Switch"] == "":
!         toReturn += "  // Skip [" + i.attributes["Name"] + "] - no command line Switch.\n";
        else:
          toReturn +="  {\""+i.attributes["Name"]+"\", \""+i.attributes["Switch"]+i.attributes["Separator"]+"\",\n   \""+i.DisplayName+"\",\n   \"\", cmVS7FlagTable::UserValue},\n"
--- 266,279 ----
      for i in self.stringProperties:
        if i.attributes["Switch"] == "":
!         if i.attributes["Name"] == "PrecompiledHeaderFile":
!           #more hardcoding
!           toReturn += "  {\"PrecompiledHeaderFile\", \"Yc\",\n"
!           toReturn += "   \"Precompiled Header Name\",\n"
!           toReturn += "   \"\", cmVS7FlagTable::UserValueRequired},\n"
!           toReturn += "  {\"PrecompiledHeaderFile\", \"Yu\",\n"
!           toReturn += "   \"Precompiled Header Name\",\n"
!           toReturn += "   \"\", cmVS7FlagTable::UserValueRequired},\n"
!         else:
!           toReturn += "  // Skip [" + i.attributes["Name"] + "] - no command line Switch.\n";
        else:
          toReturn +="  {\""+i.attributes["Name"]+"\", \""+i.attributes["Switch"]+i.attributes["Separator"]+"\",\n   \""+i.DisplayName+"\",\n   \"\", cmVS7FlagTable::UserValue},\n"



More information about the Cmake-commits mailing list