summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-23 14:59:26 -0400
committerBrad King <brad.king@kitware.com>2009-10-23 14:59:26 -0400
commit8ae66bf456e1496113c576595639c111baee6471 (patch)
tree441742c06d19fe9a9930be6ea9741f2038a659ee
parent5484550af63946292c96baba472b7a959f0dfb9d (diff)
downloadcmake-8ae66bf456e1496113c576595639c111baee6471.tar.gz
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.
-rw-r--r--Source/cmVS10CLFlagTable.h15
-rw-r--r--Source/cmVS10LinkFlagTable.h9
-rwxr-xr-xSource/cmparseMSBuildXML.py8
3 files changed, 21 insertions, 11 deletions
diff --git a/Source/cmVS10CLFlagTable.h b/Source/cmVS10CLFlagTable.h
index 806a153428..a7b1b3651a 100644
--- a/Source/cmVS10CLFlagTable.h
+++ b/Source/cmVS10CLFlagTable.h
@@ -138,7 +138,7 @@ static cmVS7FlagTable cmVS10CLFlagTable[] =
{"ErrorReporting", "errorReport:none",
"Do Not Send Report", "None", 0},
{"ErrorReporting", "errorReport:prompt",
- "Prompt Immediatelly", "Prompt", 0},
+ "Prompt Immediately", "Prompt", 0},
{"ErrorReporting", "errorReport:queue",
"Queue For Next Login", "Queue", 0},
{"ErrorReporting", "errorReport:send",
@@ -182,7 +182,7 @@ static cmVS7FlagTable cmVS10CLFlagTable[] =
{"FunctionLevelLinking", "Gy", "", "true", 0},
{"FloatingPointExceptions", "fp:except-", "", "false", 0},
{"FloatingPointExceptions", "fp:except", "", "true", 0},
- {"CodeGeneration", "hotpatch", "", "true", 0},
+ {"CreateHotpatchableImage", "hotpatch", "", "true", 0},
{"DisableLanguageExtensions", "Za", "", "true", 0},
{"TreatWChar_tAsBuiltInType", "Zc:wchar_t-", "", "false", 0},
{"TreatWChar_tAsBuiltInType", "Zc:wchar_t", "", "true", 0},
@@ -201,14 +201,16 @@ static cmVS7FlagTable cmVS10CLFlagTable[] =
{"UseUnicodeForAssemblerListing", "FAu", "", "true", 0},
//Bool Properties With Argument
- {"MultiProcessorCompilation", "MP", "", "true", cmVS7FlagTable::Continue},
+ {"MultiProcessorCompilation", "MP", "", "true",
+ cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"ProcessorNumber", "MP", "Multi-processor Compilation", "",
cmVS7FlagTable::UserValueRequired},
{"GenerateXMLDocumentationFiles", "doc", "", "true",
- cmVS7FlagTable::Continue},
+ cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"XMLDocumentationFileName", "doc", "Generate XML Documentation Files", "",
cmVS7FlagTable::UserValueRequired},
- {"BrowseInformation", "FR", "", "true", cmVS7FlagTable::Continue},
+ {"BrowseInformation", "FR", "", "true",
+ cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"BrowseInformationFile", "FR", "Enable Browse Information", "",
cmVS7FlagTable::UserValueRequired},
@@ -240,6 +242,9 @@ static cmVS7FlagTable cmVS10CLFlagTable[] =
//String Properties
// Skip [TrackerLogDirectory] - no command line Switch.
+ {"PreprocessOutputPath", "Fi",
+ "Preprocess Output Path",
+ "", cmVS7FlagTable::UserValue},
{"PrecompiledHeaderFile", "Yc",
"Precompiled Header Name",
"", cmVS7FlagTable::UserValueRequired},
diff --git a/Source/cmVS10LinkFlagTable.h b/Source/cmVS10LinkFlagTable.h
index c1f1dda727..c60e8eb207 100644
--- a/Source/cmVS10LinkFlagTable.h
+++ b/Source/cmVS10LinkFlagTable.h
@@ -191,13 +191,16 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
{"LinkDLL", "DLL", "", "true", 0},
//Bool Properties With Argument
- {"EnableUAC", "MANIFESTUAC:NO", "", "false", cmVS7FlagTable::Continue},
+ {"EnableUAC", "MANIFESTUAC:NO", "", "false",
+ cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"EnableUAC", "MANIFESTUAC:NO", "Enable User Account Control (UAC)", "",
cmVS7FlagTable::UserValueRequired},
- {"EnableUAC", "MANIFESTUAC:", "", "true", cmVS7FlagTable::Continue},
+ {"EnableUAC", "MANIFESTUAC:", "", "true",
+ cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", "",
cmVS7FlagTable::UserValueRequired},
- {"GenerateMapFile", "MAP", "", "true", cmVS7FlagTable::Continue},
+ {"GenerateMapFile", "MAP", "", "true",
+ cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"MapFileName", "MAP", "Generate Map File", "",
cmVS7FlagTable::UserValueRequired},
diff --git a/Source/cmparseMSBuildXML.py b/Source/cmparseMSBuildXML.py
index 4e3f34e42b..45190e9181 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"