Commit e99d7b1c authored by Brad King's avatar Brad King

VS12: Generate flag tables from MSBuild v120 tool files

Run cmparseMSBuildXML.py on cl.xml, lib.xml, and link.xml to generate
our flag tables:

 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/cl.xml" > cmVS12CLFlagTable.h
 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/lib.xml" > cmVS12LibFlagTable.h
 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/link.xml" > cmVS12LinkFlagTable.h

Fix up the declaration names at the top of each file.  Finally, teach
cmVisualStudio10TargetGenerator to select the version of the table
matching the version of VS.
parent 77ac9b8b
This diff is collapsed.
static cmVS7FlagTable cmVS12LibFlagTable[] =
{
//Enum Properties
{"ErrorReporting", "ERRORREPORT:PROMPT",
"PromptImmediately", "PromptImmediately", 0},
{"ErrorReporting", "ERRORREPORT:QUEUE",
"Queue For Next Login", "QueueForNextLogin", 0},
{"ErrorReporting", "ERRORREPORT:SEND",
"Send Error Report", "SendErrorReport", 0},
{"ErrorReporting", "ERRORREPORT:NONE",
"No Error Report", "NoErrorReport", 0},
{"TargetMachine", "MACHINE:ARM",
"MachineARM", "MachineARM", 0},
{"TargetMachine", "MACHINE:EBC",
"MachineEBC", "MachineEBC", 0},
{"TargetMachine", "MACHINE:IA64",
"MachineIA64", "MachineIA64", 0},
{"TargetMachine", "MACHINE:MIPS",
"MachineMIPS", "MachineMIPS", 0},
{"TargetMachine", "MACHINE:MIPS16",
"MachineMIPS16", "MachineMIPS16", 0},
{"TargetMachine", "MACHINE:MIPSFPU",
"MachineMIPSFPU", "MachineMIPSFPU", 0},
{"TargetMachine", "MACHINE:MIPSFPU16",
"MachineMIPSFPU16", "MachineMIPSFPU16", 0},
{"TargetMachine", "MACHINE:SH4",
"MachineSH4", "MachineSH4", 0},
{"TargetMachine", "MACHINE:THUMB",
"MachineTHUMB", "MachineTHUMB", 0},
{"TargetMachine", "MACHINE:X64",
"MachineX64", "MachineX64", 0},
{"TargetMachine", "MACHINE:X86",
"MachineX86", "MachineX86", 0},
{"SubSystem", "SUBSYSTEM:CONSOLE",
"Console", "Console", 0},
{"SubSystem", "SUBSYSTEM:WINDOWS",
"Windows", "Windows", 0},
{"SubSystem", "SUBSYSTEM:NATIVE",
"Native", "Native", 0},
{"SubSystem", "SUBSYSTEM:EFI_APPLICATION",
"EFI Application", "EFI Application", 0},
{"SubSystem", "SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER",
"EFI Boot Service Driver", "EFI Boot Service Driver", 0},
{"SubSystem", "SUBSYSTEM:EFI_ROM",
"EFI ROM", "EFI ROM", 0},
{"SubSystem", "SUBSYSTEM:EFI_RUNTIME_DRIVER",
"EFI Runtime", "EFI Runtime", 0},
{"SubSystem", "SUBSYSTEM:WINDOWSCE",
"WindowsCE", "WindowsCE", 0},
{"SubSystem", "SUBSYSTEM:POSIX",
"POSIX", "POSIX", 0},
//Bool Properties
{"SuppressStartupBanner", "NOLOGO", "", "true", 0},
{"IgnoreAllDefaultLibraries", "NODEFAULTLIB", "", "true", 0},
{"TreatLibWarningAsErrors", "WX:NO", "", "false", 0},
{"TreatLibWarningAsErrors", "WX", "", "true", 0},
{"Verbose", "VERBOSE", "", "true", 0},
{"LinkTimeCodeGeneration", "LTCG", "", "true", 0},
//Bool Properties With Argument
//String List Properties
// Skip [AdditionalDependencies] - no command line Switch.
{"AdditionalLibraryDirectories", "LIBPATH:",
"Additional Library Directories",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
{"IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
"Ignore Specific Default Libraries",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
{"ExportNamedFunctions", "EXPORT:",
"Export Named Functions",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
{"RemoveObjects", "REMOVE:",
"Remove Objects",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
//String Properties
{"OutputFile", "OUT:",
"Output File",
"", cmVS7FlagTable::UserValue},
{"ModuleDefinitionFile", "DEF:",
"Module Definition File Name",
"", cmVS7FlagTable::UserValue},
{"ForceSymbolReferences", "INCLUDE:",
"Force Symbol References",
"", cmVS7FlagTable::UserValue},
{"DisplayLibrary", "LIST:",
"Display Library to standard output",
"", cmVS7FlagTable::UserValue},
// Skip [MinimumRequiredVersion] - no command line Switch.
{"Name", "NAME:",
"Name",
"", cmVS7FlagTable::UserValue},
// Skip [AdditionalOptions] - no command line Switch.
// Skip [TrackerLogDirectory] - no command line Switch.
{0,0,0,0,0}
};
This diff is collapsed.
......@@ -25,31 +25,43 @@
#include "cmVS11CLFlagTable.h"
#include "cmVS11LinkFlagTable.h"
#include "cmVS11LibFlagTable.h"
#include "cmVS12CLFlagTable.h"
#include "cmVS12LinkFlagTable.h"
#include "cmVS12LibFlagTable.h"
#include <cmsys/auto_ptr.hxx>
static cmVS7FlagTable const*
cmVSGetCLFlagTable(cmLocalVisualStudioGenerator* lg)
{
if(lg->GetVersion() >= cmLocalVisualStudioGenerator::VS11)
if(lg->GetVersion() >= cmLocalVisualStudioGenerator::VS12)
{ return cmVS12CLFlagTable; }
else if(lg->GetVersion() == cmLocalVisualStudioGenerator::VS11)
{ return cmVS11CLFlagTable; }
return cmVS10CLFlagTable;
else
{ return cmVS10CLFlagTable; }
}
static cmVS7FlagTable const*
cmVSGetLibFlagTable(cmLocalVisualStudioGenerator* lg)
{
if(lg->GetVersion() >= cmLocalVisualStudioGenerator::VS11)
if(lg->GetVersion() >= cmLocalVisualStudioGenerator::VS12)
{ return cmVS12LibFlagTable; }
else if(lg->GetVersion() == cmLocalVisualStudioGenerator::VS11)
{ return cmVS11LibFlagTable; }
return cmVS10LibFlagTable;
else
{ return cmVS10LibFlagTable; }
}
static cmVS7FlagTable const*
cmVSGetLinkFlagTable(cmLocalVisualStudioGenerator* lg)
{
if(lg->GetVersion() >= cmLocalVisualStudioGenerator::VS11)
if(lg->GetVersion() >= cmLocalVisualStudioGenerator::VS12)
{ return cmVS12LinkFlagTable; }
else if(lg->GetVersion() == cmLocalVisualStudioGenerator::VS11)
{ return cmVS11LinkFlagTable; }
return cmVS10LinkFlagTable;
else
{ return cmVS10LinkFlagTable; }
}
static std::string cmVS10EscapeXML(std::string arg)
......
......@@ -9,6 +9,9 @@
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V110/1033/cl.xml"
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V110/1033/lib.xml"
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V110/1033/link.xml"
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/v120/1033/cl.xml"
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/v120/1033/lib.xml"
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/v120/1033/link.xml"
#
# BoolProperty <Name>true|false</Name>
# simple example:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment