summaryrefslogtreecommitdiffstats
path: root/Source/cmparseMSBuildXML.py
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-23 18:59:26 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-23 18:59:26 (GMT)
commit8ae66bf456e1496113c576595639c111baee6471 (patch)
tree441742c06d19fe9a9930be6ea9741f2038a659ee /Source/cmparseMSBuildXML.py
parent5484550af63946292c96baba472b7a959f0dfb9d (diff)
downloadCMake-8ae66bf456e1496113c576595639c111baee6471.zip
CMake-8ae66bf456e1496113c576595639c111baee6471.tar.gz
CMake-8ae66bf456e1496113c576595639c111baee6471.tar.bz2
Fix optionally-valued booleans in VS 10 flag table
This commit fixes the cmparseMSBuildXML.py script to generate correct flag table entries for booleans with optional value. These flags use two entries: the first should ignore the value and enable the option, and the second should use the value if given. Previously the first entry did not recognize flags with values. In particular this fixes flags like /MP4, but the change corrects matching of some other flags too. See issue #9771.
Diffstat (limited to 'Source/cmparseMSBuildXML.py')
-rwxr-xr-xSource/cmparseMSBuildXML.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmparseMSBuildXML.py b/Source/cmparseMSBuildXML.py
index 4e3f34e..45190e9 100755
--- a/Source/cmparseMSBuildXML.py
+++ b/Source/cmparseMSBuildXML.py
@@ -3,7 +3,9 @@
# more information see here:
# http://blogs.msdn.com/vcblog/archive/2008/12/16/msbuild-task.aspx
-# cl.xml
+# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/1033/cl.xml"
+# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/1033/lib.xml"
+# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/1033/link.xml"
#
# BoolProperty <Name>true|false</Name>
# simple example:
@@ -233,10 +235,10 @@ class MSBuildToCMake:
for i in self.boolProperties:
if i.argumentProperty != "":
if i.attributes["ReverseSwitch"] != "":
- toReturn += " {\""+i.attributes["Name"]+"\", \""+i.attributes["ReverseSwitch"]+"\", \"\", \"false\", cmVS7FlagTable::Continue},\n"
+ toReturn += " {\""+i.attributes["Name"]+"\", \""+i.attributes["ReverseSwitch"]+"\", \"\", \"false\",\n cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},\n"
toReturn += " {\""+i.attributes["Name"]+"\", \""+i.attributes["ReverseSwitch"]+"\", \""+i.DisplayName+"\", \"\",\n cmVS7FlagTable::UserValueRequired},\n"
if i.attributes["Switch"] != "":
- toReturn += " {\""+i.attributes["Name"]+"\", \""+i.attributes["Switch"]+"\", \"\", \"true\", cmVS7FlagTable::Continue},\n"
+ toReturn += " {\""+i.attributes["Name"]+"\", \""+i.attributes["Switch"]+"\", \"\", \"true\",\n cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},\n"
toReturn += " {\""+i.argumentProperty+"\", \""+i.attributes["Switch"]+"\", \""+i.DisplayName+"\", \"\",\n cmVS7FlagTable::UserValueRequired},\n"
toReturn += "\n //String List Properties\n"