From 20922d673375e6b819eba32e84471922b008b8a9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 11:39:37 -0500 Subject: VS: Add v142 flag tables for cl and link tools Convert from MSBuild `.xml` files: python cmConvertMSBuildXMLToJSON.py -t v142 .../2019/Preview/MSBuild/Microsoft/VC/v160/1033/cl.xml python cmConvertMSBuildXMLToJSON.py -t v142 .../2019/Preview/MSBuild/Microsoft/VC/v160/1033/link.xml --- Templates/MSBuild/FlagTables/v142_CL.json | 1201 ++++++++++++++++++++++++ Templates/MSBuild/FlagTables/v142_Link.json | 1343 +++++++++++++++++++++++++++ 2 files changed, 2544 insertions(+) create mode 100644 Templates/MSBuild/FlagTables/v142_CL.json create mode 100644 Templates/MSBuild/FlagTables/v142_Link.json diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json new file mode 100644 index 0000000..db85dd8 --- /dev/null +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -0,0 +1,1201 @@ +[ + { + "name": "DebugInformationFormat", + "switch": "", + "comment": "None", + "value": "None", + "flags": [] + }, + { + "name": "DebugInformationFormat", + "switch": "Z7", + "comment": "C7 compatible", + "value": "OldStyle", + "flags": [] + }, + { + "name": "DebugInformationFormat", + "switch": "Zi", + "comment": "Program Database", + "value": "ProgramDatabase", + "flags": [] + }, + { + "name": "DebugInformationFormat", + "switch": "ZI", + "comment": "Program Database for Edit And Continue", + "value": "EditAndContinue", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "", + "comment": "No Common Language RunTime Support", + "value": "false", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "clr", + "comment": "Common Language RunTime Support", + "value": "true", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "clr:pure", + "comment": "Pure MSIL Common Language RunTime Support", + "value": "Pure", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "clr:safe", + "comment": "Safe MSIL Common Language RunTime Support", + "value": "Safe", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W0", + "comment": "Turn Off All Warnings", + "value": "TurnOffAllWarnings", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W1", + "comment": "Level1", + "value": "Level1", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W2", + "comment": "Level2", + "value": "Level2", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W3", + "comment": "Level3", + "value": "Level3", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W4", + "comment": "Level4", + "value": "Level4", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "Wall", + "comment": "EnableAllWarnings", + "value": "EnableAllWarnings", + "flags": [] + }, + { + "name": "DiagnosticsFormat", + "switch": "diagnostics:caret", + "comment": "Caret", + "value": "Caret", + "flags": [] + }, + { + "name": "DiagnosticsFormat", + "switch": "diagnostics:column", + "comment": "Column Info", + "value": "Column", + "flags": [] + }, + { + "name": "DiagnosticsFormat", + "switch": "diagnostics:classic", + "comment": "Classic", + "value": "Classic", + "flags": [] + }, + { + "name": "Optimization", + "switch": "", + "comment": "Custom", + "value": "Custom", + "flags": [] + }, + { + "name": "Optimization", + "switch": "Od", + "comment": "Disabled", + "value": "Disabled", + "flags": [] + }, + { + "name": "Optimization", + "switch": "O1", + "comment": "Maximum Optimization (Favor Size)", + "value": "MinSpace", + "flags": [] + }, + { + "name": "Optimization", + "switch": "O2", + "comment": "Maximum Optimization (Favor Speed)", + "value": "MaxSpeed", + "flags": [] + }, + { + "name": "Optimization", + "switch": "Ox", + "comment": "Optimizations (Favor Speed)", + "value": "Full", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "Ob0", + "comment": "Disabled", + "value": "Disabled", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "Ob1", + "comment": "Only __inline", + "value": "OnlyExplicitInline", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "Ob2", + "comment": "Any Suitable", + "value": "AnySuitable", + "flags": [] + }, + { + "name": "FavorSizeOrSpeed", + "switch": "Os", + "comment": "Favor small code", + "value": "Size", + "flags": [] + }, + { + "name": "FavorSizeOrSpeed", + "switch": "Ot", + "comment": "Favor fast code", + "value": "Speed", + "flags": [] + }, + { + "name": "FavorSizeOrSpeed", + "switch": "", + "comment": "Neither", + "value": "Neither", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "EHa", + "comment": "Yes with SEH Exceptions", + "value": "Async", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "EHsc", + "comment": "Yes", + "value": "Sync", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "EHs", + "comment": "Yes with Extern C functions", + "value": "SyncCThrow", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "RTCs", + "comment": "Stack Frames", + "value": "StackFrameRuntimeCheck", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "RTCu", + "comment": "Uninitialized variables", + "value": "UninitializedLocalUsageCheck", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "RTC1", + "comment": "Both (/RTC1, equiv. to /RTCsu)", + "value": "EnableFastChecks", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MT", + "comment": "Multi-threaded", + "value": "MultiThreaded", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MTd", + "comment": "Multi-threaded Debug", + "value": "MultiThreadedDebug", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MD", + "comment": "Multi-threaded DLL", + "value": "MultiThreadedDLL", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MDd", + "comment": "Multi-threaded Debug DLL", + "value": "MultiThreadedDebugDLL", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp1", + "comment": "1 Byte", + "value": "1Byte", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp2", + "comment": "2 Bytes", + "value": "2Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp4", + "comment": "4 Byte", + "value": "4Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp8", + "comment": "8 Bytes", + "value": "8Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp16", + "comment": "16 Bytes", + "value": "16Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "BufferSecurityCheck", + "switch": "GS-", + "comment": "Disable Security Check", + "value": "false", + "flags": [] + }, + { + "name": "BufferSecurityCheck", + "switch": "GS", + "comment": "Enable Security Check", + "value": "true", + "flags": [] + }, + { + "name": "ControlFlowGuard", + "switch": "guard:cf", + "comment": "Yes", + "value": "Guard", + "flags": [] + }, + { + "name": "ControlFlowGuard", + "switch": "", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:SSE", + "comment": "Streaming SIMD Extensions", + "value": "StreamingSIMDExtensions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:SSE2", + "comment": "Streaming SIMD Extensions 2", + "value": "StreamingSIMDExtensions2", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:AVX", + "comment": "Advanced Vector Extensions", + "value": "AdvancedVectorExtensions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:AVX2", + "comment": "Advanced Vector Extensions 2", + "value": "AdvancedVectorExtensions2", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:IA32", + "comment": "No Enhanced Instructions", + "value": "NoExtensions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "FloatingPointModel", + "switch": "fp:precise", + "comment": "Precise", + "value": "Precise", + "flags": [] + }, + { + "name": "FloatingPointModel", + "switch": "fp:strict", + "comment": "Strict", + "value": "Strict", + "flags": [] + }, + { + "name": "FloatingPointModel", + "switch": "fp:fast", + "comment": "Fast", + "value": "Fast", + "flags": [] + }, + { + "name": "SpectreMitigation", + "switch": "Qspectre", + "comment": "Enabled", + "value": "Spectre", + "flags": [] + }, + { + "name": "SpectreMitigation", + "switch": "", + "comment": "Disabled", + "value": "false", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++14", + "comment": "ISO C++14 Standard", + "value": "stdcpp14", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++17", + "comment": "ISO C++17 Standard", + "value": "stdcpp17", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++latest", + "comment": "Preview - Features from the Latest C++ Working Draft", + "value": "stdcpplatest", + "flags": [] + }, + { + "name": "PrecompiledHeader", + "switch": "Yc", + "comment": "Create", + "value": "Create", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "PrecompiledHeader", + "switch": "Yu", + "comment": "Use", + "value": "Use", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "PrecompiledHeader", + "switch": "", + "comment": "Not Using Precompiled Headers", + "value": "NotUsing", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "", + "comment": "No Listing", + "value": "NoListing", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FA", + "comment": "Assembly-Only Listing", + "value": "AssemblyCode", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FAc", + "comment": "Assembly With Machine Code", + "value": "AssemblyAndMachineCode", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FAs", + "comment": "Assembly With Source Code", + "value": "AssemblyAndSourceCode", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FAcs", + "comment": "Assembly, Machine Code and Source", + "value": "All", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gd", + "comment": "__cdecl", + "value": "Cdecl", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gr", + "comment": "__fastcall", + "value": "FastCall", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gz", + "comment": "__stdcall", + "value": "StdCall", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gv", + "comment": "__vectorcall", + "value": "VectorCall", + "flags": [] + }, + { + "name": "CompileAs", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "CompileAs", + "switch": "TC", + "comment": "Compile as C Code", + "value": "CompileAsC", + "flags": [] + }, + { + "name": "CompileAs", + "switch": "TP", + "comment": "Compile as C++ Code", + "value": "CompileAsCpp", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:none", + "comment": "Do Not Send Report", + "value": "None", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:prompt", + "comment": "Prompt Immediately", + "value": "Prompt", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:queue", + "comment": "Queue For Next Login", + "value": "Queue", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:send", + "comment": "Send Automatically", + "value": "Send", + "flags": [] + }, + { + "name": "SupportJustMyCode", + "switch": "JMC", + "comment": "Support Just My Code Debugging", + "value": "true", + "flags": [] + }, + { + "name": "CompileAsWinRT", + "switch": "ZW", + "comment": "Consume Windows Runtime Extension", + "value": "true", + "flags": [] + }, + { + "name": "WinRTNoStdLib", + "switch": "ZW:nostdlib", + "comment": "No Standard WinRT Libraries", + "value": "true", + "flags": [] + }, + { + "name": "SuppressStartupBanner", + "switch": "nologo", + "comment": "Suppress Startup Banner", + "value": "true", + "flags": [] + }, + { + "name": "TreatWarningAsError", + "switch": "WX-", + "comment": "Treat Warnings As Errors", + "value": "false", + "flags": [] + }, + { + "name": "TreatWarningAsError", + "switch": "WX", + "comment": "Treat Warnings As Errors", + "value": "true", + "flags": [] + }, + { + "name": "SDLCheck", + "switch": "sdl-", + "comment": "SDL checks", + "value": "false", + "flags": [] + }, + { + "name": "SDLCheck", + "switch": "sdl", + "comment": "SDL checks", + "value": "true", + "flags": [] + }, + { + "name": "MultiProcessorCompilation", + "switch": "MP", + "comment": "Multi-processor Compilation", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "IntrinsicFunctions", + "switch": "Oi", + "comment": "Enable Intrinsic Functions", + "value": "true", + "flags": [] + }, + { + "name": "OmitFramePointers", + "switch": "Oy-", + "comment": "Omit Frame Pointers", + "value": "false", + "flags": [] + }, + { + "name": "OmitFramePointers", + "switch": "Oy", + "comment": "Omit Frame Pointers", + "value": "true", + "flags": [] + }, + { + "name": "EnableFiberSafeOptimizations", + "switch": "GT", + "comment": "Enable Fiber-Safe Optimizations", + "value": "true", + "flags": [] + }, + { + "name": "WholeProgramOptimization", + "switch": "GL", + "comment": "Whole Program Optimization", + "value": "true", + "flags": [] + }, + { + "name": "UndefineAllPreprocessorDefinitions", + "switch": "u", + "comment": "Undefine All Preprocessor Definitions", + "value": "true", + "flags": [] + }, + { + "name": "IgnoreStandardIncludePath", + "switch": "X", + "comment": "Ignore Standard Include Paths", + "value": "true", + "flags": [] + }, + { + "name": "PreprocessToFile", + "switch": "P", + "comment": "Preprocess to a File", + "value": "true", + "flags": [] + }, + { + "name": "PreprocessSuppressLineNumbers", + "switch": "EP", + "comment": "Preprocess Suppress Line Numbers", + "value": "true", + "flags": [] + }, + { + "name": "PreprocessKeepComments", + "switch": "C", + "comment": "Keep Comments", + "value": "true", + "flags": [] + }, + { + "name": "StringPooling", + "switch": "GF-", + "comment": "Enable String Pooling", + "value": "false", + "flags": [] + }, + { + "name": "StringPooling", + "switch": "GF", + "comment": "Enable String Pooling", + "value": "true", + "flags": [] + }, + { + "name": "MinimalRebuild", + "switch": "Gm-", + "comment": "Enable Minimal Rebuild", + "value": "false", + "flags": [] + }, + { + "name": "MinimalRebuild", + "switch": "Gm", + "comment": "Enable Minimal Rebuild", + "value": "true", + "flags": [] + }, + { + "name": "SmallerTypeCheck", + "switch": "RTCc", + "comment": "Smaller Type Check", + "value": "true", + "flags": [] + }, + { + "name": "FunctionLevelLinking", + "switch": "Gy-", + "comment": "Enable Function-Level Linking", + "value": "false", + "flags": [] + }, + { + "name": "FunctionLevelLinking", + "switch": "Gy", + "comment": "Enable Function-Level Linking", + "value": "true", + "flags": [] + }, + { + "name": "EnableParallelCodeGeneration", + "switch": "Qpar-", + "comment": "Enable Parallel Code Generation", + "value": "false", + "flags": [] + }, + { + "name": "EnableParallelCodeGeneration", + "switch": "Qpar", + "comment": "Enable Parallel Code Generation", + "value": "true", + "flags": [] + }, + { + "name": "FloatingPointExceptions", + "switch": "fp:except-", + "comment": "Enable Floating Point Exceptions", + "value": "false", + "flags": [] + }, + { + "name": "FloatingPointExceptions", + "switch": "fp:except", + "comment": "Enable Floating Point Exceptions", + "value": "true", + "flags": [] + }, + { + "name": "CreateHotpatchableImage", + "switch": "hotpatch", + "comment": "Create Hotpatchable Image", + "value": "true", + "flags": [] + }, + { + "name": "DisableLanguageExtensions", + "switch": "Za", + "comment": "Disable Language Extensions", + "value": "true", + "flags": [] + }, + { + "name": "ConformanceMode", + "switch": "permissive-", + "comment": "Conformance mode", + "value": "true", + "flags": [] + }, + { + "name": "TreatWChar_tAsBuiltInType", + "switch": "Zc:wchar_t-", + "comment": "Treat WChar_t As Built in Type", + "value": "false", + "flags": [] + }, + { + "name": "TreatWChar_tAsBuiltInType", + "switch": "Zc:wchar_t", + "comment": "Treat WChar_t As Built in Type", + "value": "true", + "flags": [] + }, + { + "name": "ForceConformanceInForLoopScope", + "switch": "Zc:forScope-", + "comment": "Force Conformance in For Loop Scope", + "value": "false", + "flags": [] + }, + { + "name": "ForceConformanceInForLoopScope", + "switch": "Zc:forScope", + "comment": "Force Conformance in For Loop Scope", + "value": "true", + "flags": [] + }, + { + "name": "RemoveUnreferencedCodeData", + "switch": "Zc:inline", + "comment": "Remove unreferenced code and data", + "value": "true", + "flags": [] + }, + { + "name": "EnforceTypeConversionRules", + "switch": "Zc:rvalueCast-", + "comment": "Enforce type conversion rules", + "value": "false", + "flags": [] + }, + { + "name": "EnforceTypeConversionRules", + "switch": "Zc:rvalueCast", + "comment": "Enforce type conversion rules", + "value": "true", + "flags": [] + }, + { + "name": "RuntimeTypeInfo", + "switch": "GR-", + "comment": "Enable Run-Time Type Information", + "value": "false", + "flags": [] + }, + { + "name": "RuntimeTypeInfo", + "switch": "GR", + "comment": "Enable Run-Time Type Information", + "value": "true", + "flags": [] + }, + { + "name": "OpenMPSupport", + "switch": "openmp-", + "comment": "Open MP Support", + "value": "false", + "flags": [] + }, + { + "name": "OpenMPSupport", + "switch": "openmp", + "comment": "Open MP Support", + "value": "true", + "flags": [] + }, + { + "name": "EnableModules", + "switch": "experimental:module", + "comment": "Enable C++ Modules (experimental)", + "value": "true", + "flags": [] + }, + { + "name": "ExpandAttributedSource", + "switch": "Fx", + "comment": "Expand Attributed Source", + "value": "true", + "flags": [] + }, + { + "name": "UseUnicodeForAssemblerListing", + "switch": "FAu", + "comment": "Use Unicode For Assembler Listing", + "value": "true", + "flags": [] + }, + { + "name": "GenerateXMLDocumentationFiles", + "switch": "doc", + "comment": "Generate XML Documentation Files", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "BrowseInformation", + "switch": "FR", + "comment": "Enable Browse Information", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "ShowIncludes", + "switch": "showIncludes", + "comment": "Show Includes", + "value": "true", + "flags": [] + }, + { + "name": "EnablePREfast", + "switch": "analyze-", + "comment": "Enable Code Analysis", + "value": "false", + "flags": [] + }, + { + "name": "EnablePREfast", + "switch": "analyze", + "comment": "Enable Code Analysis", + "value": "true", + "flags": [] + }, + { + "name": "UseFullPaths", + "switch": "FC", + "comment": "Use Full Paths", + "value": "true", + "flags": [] + }, + { + "name": "OmitDefaultLibName", + "switch": "Zl", + "comment": "Omit Default Library Name", + "value": "true", + "flags": [] + }, + { + "name": "AdditionalIncludeDirectories", + "switch": "I", + "comment": "Additional Include Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalUsingDirectories", + "switch": "AI", + "comment": "Additional #using Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "PreprocessorDefinitions", + "switch": "D", + "comment": "Preprocessor Definitions", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "UndefinePreprocessorDefinitions", + "switch": "U", + "comment": "Undefine Preprocessor Definitions", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "DisableSpecificWarnings", + "switch": "wd", + "comment": "Disable Specific Warnings", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ForcedIncludeFiles", + "switch": "FI", + "comment": "Forced Include File", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ForcedUsingFiles", + "switch": "FU", + "comment": "Forced #using File", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "PREfastAdditionalOptions", + "switch": "analyze:", + "comment": "Additional Code Analysis Native options", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "PREfastAdditionalPlugins", + "switch": "analyze:plugin", + "comment": "Additional Code Analysis Native plugins", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "TreatSpecificWarningsAsErrors", + "switch": "we", + "comment": "Treat Specific Warnings As Errors", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "WarningVersion", + "switch": "Wv:", + "comment": "Warning Version", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "PreprocessOutputPath", + "switch": "Fi", + "comment": "Preprocess Output Path", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "PrecompiledHeaderFile", + "switch": "Yu", + "comment": "Precompiled Header File", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "PrecompiledHeaderFile", + "switch": "Yc", + "comment": "Precompiled Header File", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "PrecompiledHeaderOutputFile", + "switch": "Fp", + "comment": "Precompiled Header Output File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "AssemblerListingLocation", + "switch": "Fa", + "comment": "ASM List Location", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ObjectFileName", + "switch": "Fo", + "comment": "Object File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProgramDataBaseFileName", + "switch": "Fd", + "comment": "Program Database File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "XMLDocumentationFileName", + "switch": "doc", + "comment": "XML Documentation File Name", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "BrowseInformationFile", + "switch": "FR", + "comment": "Browse Information File", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "PREfastLog", + "switch": "analyze:log", + "comment": "Code Analysis Log", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProcessorNumber", + "switch": "MP", + "comment": "Number of processors", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + } +] diff --git a/Templates/MSBuild/FlagTables/v142_Link.json b/Templates/MSBuild/FlagTables/v142_Link.json new file mode 100644 index 0000000..acdb5ac --- /dev/null +++ b/Templates/MSBuild/FlagTables/v142_Link.json @@ -0,0 +1,1343 @@ +[ + { + "name": "ShowProgress", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE", + "comment": "Display all progress messages", + "value": "LinkVerbose", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:Lib", + "comment": "For Libraries Searched", + "value": "LinkVerboseLib", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:ICF", + "comment": "About COMDAT folding during optimized linking", + "value": "LinkVerboseICF", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:REF", + "comment": "About data removed during optimized linking", + "value": "LinkVerboseREF", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:SAFESEH", + "comment": "About Modules incompatible with SEH", + "value": "LinkVerboseSAFESEH", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:CLR", + "comment": "About linker activity related to managed code", + "value": "LinkVerboseCLR", + "flags": [] + }, + { + "name": "ForceFileOutput", + "switch": "FORCE", + "comment": "Enabled", + "value": "Enabled", + "flags": [] + }, + { + "name": "ForceFileOutput", + "switch": "FORCE:MULTIPLE", + "comment": "Multiply Defined Symbol Only", + "value": "MultiplyDefinedSymbolOnly", + "flags": [] + }, + { + "name": "ForceFileOutput", + "switch": "FORCE:UNRESOLVED", + "comment": "Undefined Symbol Only", + "value": "UndefinedSymbolOnly", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN", + "comment": "Enabled", + "value": "Enabled", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN:5", + "comment": "X86 Image Only", + "value": "X86Image", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN:6", + "comment": "X64 Image Only", + "value": "X64Image", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN:16", + "comment": "Itanium Image Only", + "value": "ItaniumImage", + "flags": [] + }, + { + "name": "UACExecutionLevel", + "switch": "level='asInvoker'", + "comment": "asInvoker", + "value": "AsInvoker", + "flags": [] + }, + { + "name": "UACExecutionLevel", + "switch": "level='highestAvailable'", + "comment": "highestAvailable", + "value": "HighestAvailable", + "flags": [] + }, + { + "name": "UACExecutionLevel", + "switch": "level='requireAdministrator'", + "comment": "requireAdministrator", + "value": "RequireAdministrator", + "flags": [] + }, + { + "name": "GenerateDebugInformation", + "switch": "", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG", + "comment": "Generate Debug Information", + "value": "true", + "flags": [] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG:FASTLINK", + "comment": "Generate Debug Information optimized for faster links", + "value": "DebugFastLink", + "flags": [] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG:FULL", + "comment": "Generate Debug Information optimized for sharing and publishing", + "value": "DebugFull", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:CONSOLE", + "comment": "Console", + "value": "Console", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:WINDOWS", + "comment": "Windows", + "value": "Windows", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:NATIVE", + "comment": "Native", + "value": "Native", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_APPLICATION", + "comment": "EFI Application", + "value": "EFI Application", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER", + "comment": "EFI Boot Service Driver", + "value": "EFI Boot Service Driver", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_ROM", + "comment": "EFI ROM", + "value": "EFI ROM", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_RUNTIME_DRIVER", + "comment": "EFI Runtime", + "value": "EFI Runtime", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:POSIX", + "comment": "POSIX", + "value": "POSIX", + "flags": [] + }, + { + "name": "Driver", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "Driver", + "switch": "Driver", + "comment": "Driver", + "value": "Driver", + "flags": [] + }, + { + "name": "Driver", + "switch": "DRIVER:UPONLY", + "comment": "UP Only", + "value": "UpOnly", + "flags": [] + }, + { + "name": "Driver", + "switch": "DRIVER:WDM", + "comment": "WDM", + "value": "WDM", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:incremental", + "comment": "Use Fast Link Time Code Generation", + "value": "UseFastLinkTimeCodeGeneration", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG", + "comment": "Use Link Time Code Generation", + "value": "UseLinkTimeCodeGeneration", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:PGInstrument", + "comment": "Profile Guided Optimization - Instrument", + "value": "PGInstrument", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:PGOptimize", + "comment": "Profile Guided Optimization - Optimization", + "value": "PGOptimization", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:PGUpdate", + "comment": "Profile Guided Optimization - Update", + "value": "PGUpdate", + "flags": [] + }, + { + "name": "GenerateWindowsMetadata", + "switch": "WINMD", + "comment": "Yes", + "value": "true", + "flags": [] + }, + { + "name": "GenerateWindowsMetadata", + "switch": "WINMD:NO", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA1", + "comment": "SHA1", + "value": "SHA1", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA256", + "comment": "SHA256", + "value": "SHA256", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA384", + "comment": "SHA384", + "value": "SHA384", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA512", + "comment": "SHA512", + "value": "SHA512", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:ARM", + "comment": "MachineARM", + "value": "MachineARM", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:ARM64", + "comment": "MachineARM64", + "value": "MachineARM64", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:EBC", + "comment": "MachineEBC", + "value": "MachineEBC", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:IA64", + "comment": "MachineIA64", + "value": "MachineIA64", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:MIPS", + "comment": "MachineMIPS", + "value": "MachineMIPS", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:MIPS16", + "comment": "MachineMIPS16", + "value": "MachineMIPS16", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:MIPSFPU", + "comment": "MachineMIPSFPU", + "value": "MachineMIPSFPU", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:MIPSFPU16", + "comment": "MachineMIPSFPU16", + "value": "MachineMIPSFPU16", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:SH4", + "comment": "MachineSH4", + "value": "MachineSH4", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:THUMB", + "comment": "MachineTHUMB", + "value": "MachineTHUMB", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:X64", + "comment": "MachineX64", + "value": "MachineX64", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:X86", + "comment": "MachineX86", + "value": "MachineX86", + "flags": [] + }, + { + "name": "CLRThreadAttribute", + "switch": "CLRTHREADATTRIBUTE:MTA", + "comment": "MTA threading attribute", + "value": "MTAThreadingAttribute", + "flags": [] + }, + { + "name": "CLRThreadAttribute", + "switch": "CLRTHREADATTRIBUTE:STA", + "comment": "STA threading attribute", + "value": "STAThreadingAttribute", + "flags": [] + }, + { + "name": "CLRThreadAttribute", + "switch": "CLRTHREADATTRIBUTE:NONE", + "comment": "Default threading attribute", + "value": "DefaultThreadingAttribute", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "CLRIMAGETYPE:IJW", + "comment": "Force IJW image", + "value": "ForceIJWImage", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "CLRIMAGETYPE:PURE", + "comment": "Force Pure IL Image", + "value": "ForcePureILImage", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "CLRIMAGETYPE:SAFE", + "comment": "Force Safe IL Image", + "value": "ForceSafeILImage", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "", + "comment": "Default image type", + "value": "Default", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA1", + "comment": "SHA1", + "value": "SHA1", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA256", + "comment": "SHA256", + "value": "SHA256", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA384", + "comment": "SHA384", + "value": "SHA384", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA512", + "comment": "SHA512", + "value": "SHA512", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:PROMPT", + "comment": "PromptImmediately", + "value": "PromptImmediately", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:QUEUE", + "comment": "Queue For Next Login", + "value": "QueueForNextLogin", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:SEND", + "comment": "Send Error Report", + "value": "SendErrorReport", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:NONE", + "comment": "No Error Report", + "value": "NoErrorReport", + "flags": [] + }, + { + "name": "CLRSupportLastError", + "switch": "CLRSupportLastError", + "comment": "Enabled", + "value": "Enabled", + "flags": [] + }, + { + "name": "CLRSupportLastError", + "switch": "CLRSupportLastError:NO", + "comment": "Disabled", + "value": "Disabled", + "flags": [] + }, + { + "name": "CLRSupportLastError", + "switch": "CLRSupportLastError:SYSTEMDLL", + "comment": "System Dlls Only", + "value": "SystemDlls", + "flags": [] + }, + { + "name": "LinkControlFlowGuard", + "switch": "guard:cf", + "comment": "Enable Security Check with Guard", + "value": "Guard", + "flags": [] + }, + { + "name": "LinkIncremental", + "switch": "INCREMENTAL:NO", + "comment": "Enable Incremental Linking", + "value": "false", + "flags": [] + }, + { + "name": "LinkIncremental", + "switch": "INCREMENTAL", + "comment": "Enable Incremental Linking", + "value": "true", + "flags": [] + }, + { + "name": "SuppressStartupBanner", + "switch": "NOLOGO", + "comment": "Suppress Startup Banner", + "value": "true", + "flags": [] + }, + { + "name": "LinkStatus", + "switch": "LTCG:NOSTATUS", + "comment": "Link Status", + "value": "false", + "flags": [] + }, + { + "name": "LinkStatus", + "switch": "LTCG:STATUS", + "comment": "Link Status", + "value": "true", + "flags": [] + }, + { + "name": "PreventDllBinding", + "switch": "ALLOWBIND:NO", + "comment": "Prevent Dll Binding", + "value": "false", + "flags": [] + }, + { + "name": "PreventDllBinding", + "switch": "ALLOWBIND", + "comment": "Prevent Dll Binding", + "value": "true", + "flags": [] + }, + { + "name": "TreatLinkerWarningAsErrors", + "switch": "WX:NO", + "comment": "Treat Linker Warning As Errors", + "value": "false", + "flags": [] + }, + { + "name": "TreatLinkerWarningAsErrors", + "switch": "WX", + "comment": "Treat Linker Warning As Errors", + "value": "true", + "flags": [] + }, + { + "name": "IgnoreAllDefaultLibraries", + "switch": "NODEFAULTLIB", + "comment": "Ignore All Default Libraries", + "value": "true", + "flags": [] + }, + { + "name": "GenerateManifest", + "switch": "MANIFEST:NO", + "comment": "Generate Manifest", + "value": "false", + "flags": [] + }, + { + "name": "GenerateManifest", + "switch": "MANIFEST", + "comment": "Generate Manifest", + "value": "true", + "flags": [] + }, + { + "name": "AllowIsolation", + "switch": "ALLOWISOLATION:NO", + "comment": "Allow Isolation", + "value": "false", + "flags": [] + }, + { + "name": "AllowIsolation", + "switch": "", + "comment": "Allow Isolation", + "value": "true", + "flags": [] + }, + { + "name": "EnableUAC", + "switch": "MANIFESTUAC:NO", + "comment": "Enable User Account Control (UAC)", + "value": "false", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "EnableUAC", + "switch": "MANIFESTUAC:", + "comment": "Enable User Account Control (UAC)", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "UACUIAccess", + "switch": "uiAccess='false'", + "comment": "UAC Bypass UI Protection", + "value": "false", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "UACUIAccess", + "switch": "MANIFESTUAC:", + "comment": "UAC Bypass UI Protection", + "value": "true", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "UACUIAccess", + "switch": "uiAccess='false'", + "comment": "UAC Bypass UI Protection", + "value": "false", + "flags": [] + }, + { + "name": "UACUIAccess", + "switch": "uiAccess='true'", + "comment": "UAC Bypass UI Protection", + "value": "true", + "flags": [] + }, + { + "name": "ManifestEmbed", + "switch": "manifest:embed", + "comment": "Embed Manifest", + "value": "true", + "flags": [] + }, + { + "name": "GenerateMapFile", + "switch": "MAP", + "comment": "Generate Map File", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "MapExports", + "switch": "MAPINFO:EXPORTS", + "comment": "Map Exports", + "value": "true", + "flags": [] + }, + { + "name": "AssemblyDebug", + "switch": "ASSEMBLYDEBUG:DISABLE", + "comment": "Debuggable Assembly", + "value": "false", + "flags": [] + }, + { + "name": "AssemblyDebug", + "switch": "ASSEMBLYDEBUG", + "comment": "Debuggable Assembly", + "value": "true", + "flags": [] + }, + { + "name": "LargeAddressAware", + "switch": "LARGEADDRESSAWARE:NO", + "comment": "Enable Large Addresses", + "value": "false", + "flags": [] + }, + { + "name": "LargeAddressAware", + "switch": "LARGEADDRESSAWARE", + "comment": "Enable Large Addresses", + "value": "true", + "flags": [] + }, + { + "name": "TerminalServerAware", + "switch": "TSAWARE:NO", + "comment": "Terminal Server", + "value": "false", + "flags": [] + }, + { + "name": "TerminalServerAware", + "switch": "TSAWARE", + "comment": "Terminal Server", + "value": "true", + "flags": [] + }, + { + "name": "SwapRunFromCD", + "switch": "SWAPRUN:CD", + "comment": "Swap Run From CD", + "value": "true", + "flags": [] + }, + { + "name": "SwapRunFromNET", + "switch": "SWAPRUN:NET", + "comment": "Swap Run From Network", + "value": "true", + "flags": [] + }, + { + "name": "OptimizeReferences", + "switch": "OPT:NOREF", + "comment": "References", + "value": "false", + "flags": [] + }, + { + "name": "OptimizeReferences", + "switch": "OPT:REF", + "comment": "References", + "value": "true", + "flags": [] + }, + { + "name": "EnableCOMDATFolding", + "switch": "OPT:NOICF", + "comment": "Enable COMDAT Folding", + "value": "false", + "flags": [] + }, + { + "name": "EnableCOMDATFolding", + "switch": "OPT:ICF", + "comment": "Enable COMDAT Folding", + "value": "true", + "flags": [] + }, + { + "name": "IgnoreEmbeddedIDL", + "switch": "IGNOREIDL", + "comment": "Ignore Embedded IDL", + "value": "true", + "flags": [] + }, + { + "name": "AppContainer", + "switch": "APPCONTAINER", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "WindowsMetadataLinkDelaySign", + "switch": "WINMDDELAYSIGN:NO", + "comment": "Windows Metadata Delay Sign", + "value": "false", + "flags": [] + }, + { + "name": "WindowsMetadataLinkDelaySign", + "switch": "WINMDDELAYSIGN", + "comment": "Windows Metadata Delay Sign", + "value": "true", + "flags": [] + }, + { + "name": "NoEntryPoint", + "switch": "NOENTRY", + "comment": "No Entry Point", + "value": "true", + "flags": [] + }, + { + "name": "SetChecksum", + "switch": "RELEASE", + "comment": "Set Checksum", + "value": "true", + "flags": [] + }, + { + "name": "RandomizedBaseAddress", + "switch": "DYNAMICBASE:NO", + "comment": "Randomized Base Address", + "value": "false", + "flags": [] + }, + { + "name": "RandomizedBaseAddress", + "switch": "DYNAMICBASE", + "comment": "Randomized Base Address", + "value": "true", + "flags": [] + }, + { + "name": "FixedBaseAddress", + "switch": "FIXED:NO", + "comment": "Fixed Base Address", + "value": "false", + "flags": [] + }, + { + "name": "FixedBaseAddress", + "switch": "FIXED", + "comment": "Fixed Base Address", + "value": "true", + "flags": [] + }, + { + "name": "DataExecutionPrevention", + "switch": "NXCOMPAT:NO", + "comment": "Data Execution Prevention (DEP)", + "value": "false", + "flags": [] + }, + { + "name": "DataExecutionPrevention", + "switch": "NXCOMPAT", + "comment": "Data Execution Prevention (DEP)", + "value": "true", + "flags": [] + }, + { + "name": "TurnOffAssemblyGeneration", + "switch": "NOASSEMBLY", + "comment": "Turn Off Assembly Generation", + "value": "true", + "flags": [] + }, + { + "name": "SupportUnloadOfDelayLoadedDLL", + "switch": "DELAY:UNLOAD", + "comment": "Unload delay loaded DLL", + "value": "true", + "flags": [] + }, + { + "name": "SupportNobindOfDelayLoadedDLL", + "switch": "DELAY:NOBIND", + "comment": "Nobind delay loaded DLL", + "value": "true", + "flags": [] + }, + { + "name": "Profile", + "switch": "PROFILE", + "comment": "Profile", + "value": "true", + "flags": [] + }, + { + "name": "LinkDelaySign", + "switch": "DELAYSIGN:NO", + "comment": "Delay Sign", + "value": "false", + "flags": [] + }, + { + "name": "LinkDelaySign", + "switch": "DELAYSIGN", + "comment": "Delay Sign", + "value": "true", + "flags": [] + }, + { + "name": "CLRUnmanagedCodeCheck", + "switch": "CLRUNMANAGEDCODECHECK:NO", + "comment": "CLR Unmanaged Code Check", + "value": "false", + "flags": [] + }, + { + "name": "CLRUnmanagedCodeCheck", + "switch": "CLRUNMANAGEDCODECHECK", + "comment": "CLR Unmanaged Code Check", + "value": "true", + "flags": [] + }, + { + "name": "DetectOneDefinitionRule", + "switch": "ODR", + "comment": "Detect One Definition Rule violations", + "value": "true", + "flags": [] + }, + { + "name": "ImageHasSafeExceptionHandlers", + "switch": "SAFESEH:NO", + "comment": "Image Has Safe Exception Handlers", + "value": "false", + "flags": [] + }, + { + "name": "ImageHasSafeExceptionHandlers", + "switch": "SAFESEH", + "comment": "Image Has Safe Exception Handlers", + "value": "true", + "flags": [] + }, + { + "name": "LinkDLL", + "switch": "DLL", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AdditionalLibraryDirectories", + "switch": "LIBPATH:", + "comment": "Additional Library Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "Natvis", + "switch": "NATVIS:", + "comment": "Natvis files", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "IgnoreSpecificDefaultLibraries", + "switch": "NODEFAULTLIB:", + "comment": "Ignore Specific Default Libraries", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AddModuleNamesToAssembly", + "switch": "ASSEMBLYMODULE:", + "comment": "Add Module to Assembly", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "EmbedManagedResourceFile", + "switch": "ASSEMBLYRESOURCE:", + "comment": "Embed Managed Resource File", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ForceSymbolReferences", + "switch": "INCLUDE:", + "comment": "Force Symbol References", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "DelayLoadDLLs", + "switch": "DELAYLOAD:", + "comment": "Delay Loaded Dlls", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AssemblyLinkResource", + "switch": "ASSEMBLYLINKRESOURCE:", + "comment": "Assembly Link Resource", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalManifestDependencies", + "switch": "MANIFESTDEPENDENCY:", + "comment": "Additional Manifest Dependencies", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ManifestInput", + "switch": "manifestinput:", + "comment": "Manifest Input", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "OutputFile", + "switch": "OUT:", + "comment": "Output File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "Version", + "switch": "VERSION:", + "comment": "Version", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "SpecifySectionAttributes", + "switch": "SECTION:", + "comment": "Specify Section Attributes", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MSDOSStubFileName", + "switch": "STUB:", + "comment": "MS-DOS Stub File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ModuleDefinitionFile", + "switch": "DEF:", + "comment": "Module Definition File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ManifestFile", + "switch": "ManifestFile:", + "comment": "Manifest File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProgramDatabaseFile", + "switch": "PDB:", + "comment": "Generate Program Database File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "StripPrivateSymbols", + "switch": "PDBSTRIPPED:", + "comment": "Strip Private Symbols", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MapFileName", + "switch": "MAP:", + "comment": "Map File Name", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "HeapReserveSize", + "switch": "HEAP:", + "comment": "Heap Reserve Size", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "HeapCommitSize", + "switch": "HEAP", + "comment": "Heap Commit Size", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "StackReserveSize", + "switch": "STACK:", + "comment": "Stack Reserve Size", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "StackCommitSize", + "switch": "STACK", + "comment": "Stack Commit Size", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "FunctionOrder", + "switch": "ORDER:@", + "comment": "Function Order", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProfileGuidedDatabase", + "switch": "PGD:", + "comment": "Profile Guided Database", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MidlCommandFile", + "switch": "MIDL:@", + "comment": "MIDL Commands", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MergedIDLBaseFileName", + "switch": "IDLOUT:", + "comment": "Merged IDL Base File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "TypeLibraryFile", + "switch": "TLBOUT:", + "comment": "Type Library", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "WindowsMetadataFile", + "switch": "WINMDFILE:", + "comment": "Windows Metadata File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "WindowsMetadataLinkKeyFile", + "switch": "WINMDKEYFILE:", + "comment": "Windows Metadata Key File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "WindowsMetadataKeyContainer", + "switch": "WINMDKEYCONTAINER:", + "comment": "Windows Metadata Key Container", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "EntryPointSymbol", + "switch": "ENTRY:", + "comment": "Entry Point", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "BaseAddress", + "switch": "BASE:", + "comment": "Base Address", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ImportLibrary", + "switch": "IMPLIB:", + "comment": "Import Library", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MergeSections", + "switch": "MERGE:", + "comment": "Merge Sections", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "LinkKeyFile", + "switch": "KEYFILE:", + "comment": "Key File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "KeyContainer", + "switch": "KEYCONTAINER:", + "comment": "Key Container", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "TypeLibraryResourceID", + "switch": "TLBID:", + "comment": "TypeLib Resource ID", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "SectionAlignment", + "switch": "ALIGN:", + "comment": "SectionAlignment", + "value": "", + "flags": [ + "UserValue" + ] + } +] -- cgit v0.12 From fb2e418c64d915b4d75f55f815e67923216def62 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 11:48:10 -0500 Subject: VS: Fix `/analyze:log` flag mapping for v142 Apply the change from commit 44dc9fc48a (VS: Fix /analyze:log flag mapping, 2018-11-26) to the v142 flag table. The `/analyze:log` argument requires a value in the following argument. Also drop the general `/analyze:` flag table entry so that such flags will be passed through as plain additional options. This is necessary because some such options have following values and some do not but not all have `.vcxproj` elements to hold the values. --- Templates/MSBuild/FlagTables/v142_CL.json | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json index db85dd8..437b711 100644 --- a/Templates/MSBuild/FlagTables/v142_CL.json +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -1056,13 +1056,12 @@ ] }, { - "name": "PREfastAdditionalOptions", - "switch": "analyze:", - "comment": "Additional Code Analysis Native options", + "name": "PREfastLog", + "switch": "analyze:log", + "comment": "Code Analysis Log", "value": "", "flags": [ - "UserValue", - "SemicolonAppendable" + "UserFollowing" ] }, { @@ -1180,15 +1179,6 @@ ] }, { - "name": "PREfastLog", - "switch": "analyze:log", - "comment": "Code Analysis Log", - "value": "", - "flags": [ - "UserValue" - ] - }, - { "name": "ProcessorNumber", "switch": "MP", "comment": "Number of processors", -- cgit v0.12 From 0df37903715d900fa5cfa3c51176649ed69d7d50 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 11:53:26 -0500 Subject: VS: Add `-Zc:inline[-]` flag table entry for v142 Apply the change from commit f1223e34c6 (VS: Add v140 flag table entries for `-Zc:inline[-]`, 2018-11-26) to the v142 flag table. The documentation of this option [1] claims that the default is off, but VS seems to use `-Zc:inline` by default if `RemoveUnreferencedCodeData` does not appear in the `.vcxproj` file. Add the flag table entry to allow use of the flag to be configured. [1] https://msdn.microsoft.com/en-us/library/dn642448.aspx --- Templates/MSBuild/FlagTables/v142_CL.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json index 437b711..eff5dec 100644 --- a/Templates/MSBuild/FlagTables/v142_CL.json +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -860,6 +860,13 @@ }, { "name": "RemoveUnreferencedCodeData", + "switch": "Zc:inline-", + "comment": "Remove unreferenced code and data", + "value": "false", + "flags": [] + }, + { + "name": "RemoveUnreferencedCodeData", "switch": "Zc:inline", "comment": "Remove unreferenced code and data", "value": "true", -- cgit v0.12 From 460a146e2b8da5355e4638706002715aed85acbc Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 12:39:50 -0500 Subject: VS: Populate `/Y-` flag table entry for v142 Apply the change from commit 8df25f9400 (VS: connect /Y- compiler option with "Not Using Precompiled Headers", 2018-11-26) to the v142 flag table. --- Templates/MSBuild/FlagTables/v142_CL.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json index eff5dec..70d20c5 100644 --- a/Templates/MSBuild/FlagTables/v142_CL.json +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -478,7 +478,7 @@ }, { "name": "PrecompiledHeader", - "switch": "", + "switch": "Y-", "comment": "Not Using Precompiled Headers", "value": "NotUsing", "flags": [] -- cgit v0.12 From 43aa632f57bb31514719b7f0d629a9285147f7f8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 12:43:40 -0500 Subject: VS: Populate `-Qspectre-` flag table entry for v142 Rather than the change from commit 584ad067ba (VS: Fix flag table entry for -Qspectre, 2018-11-26), update the v142 flag table with an actual flag for the negative form of the flag. Switch the entry order so that the longer negative form is first. --- Templates/MSBuild/FlagTables/v142_CL.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json index 70d20c5..d3d7f72 100644 --- a/Templates/MSBuild/FlagTables/v142_CL.json +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -421,16 +421,16 @@ }, { "name": "SpectreMitigation", - "switch": "Qspectre", - "comment": "Enabled", - "value": "Spectre", + "switch": "Qspectre-", + "comment": "Spectre mitigations disabled", + "value": "false", "flags": [] }, { "name": "SpectreMitigation", - "switch": "", - "comment": "Disabled", - "value": "false", + "switch": "Qspectre", + "comment": "Spectre mitigations enabled", + "value": "Spectre", "flags": [] }, { -- cgit v0.12 From 049410c0b61aa1894cab8b3885c78d59fdcbcd9e Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 12:52:49 -0500 Subject: VS: Populate `/JMC-` flag table entry for v142 Add the negative form of the option. --- Templates/MSBuild/FlagTables/v142_CL.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json index d3d7f72..479df03 100644 --- a/Templates/MSBuild/FlagTables/v142_CL.json +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -597,6 +597,13 @@ }, { "name": "SupportJustMyCode", + "switch": "JMC-", + "comment": "Support Just My Code Debugging", + "value": "false", + "flags": [] + }, + { + "name": "SupportJustMyCode", "switch": "JMC", "comment": "Support Just My Code Debugging", "value": "true", -- cgit v0.12 From a7973ccb5310b24acdc9176555b458bad6000a43 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 12:56:52 -0500 Subject: VS: Populate `/permissive` flag table entry for v142 Apply the change from commit e0d6d01e52 (VS: Add flag table entry for "permissive" flag to disable conformance mode, 2018-12-10) to the v142 flag table. --- Templates/MSBuild/FlagTables/v142_CL.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json index 479df03..95b9d14 100644 --- a/Templates/MSBuild/FlagTables/v142_CL.json +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -833,11 +833,18 @@ { "name": "ConformanceMode", "switch": "permissive-", - "comment": "Conformance mode", + "comment": "Conformance mode enabled", "value": "true", "flags": [] }, { + "name": "ConformanceMode", + "switch": "permissive", + "comment": "Conformance mode disabled", + "value": "false", + "flags": [] + }, + { "name": "TreatWChar_tAsBuiltInType", "switch": "Zc:wchar_t-", "comment": "Treat WChar_t As Built in Type", -- cgit v0.12 From d2fcc6748aa2a7888fc1d0d8366f19141c2cf2c0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 13:01:30 -0500 Subject: VS: Fix `/MANIFESTUAC:NO` link flag mapping for v142 Apply the change from commit 1d00fd7702 (VS: Fix /MANIFESTUAC:NO linker option mapping, 2018-11-21) to the v142 flag table. There are no versions of `/MANIFESTUAC:NO` where addition values are appended. Remove both of the `MANIFESTUAC:NO` entries from our flag tables and replace them with one which would set `EnableUAC` to false and immediately stop processing the `/MANIFESTUAC:NO` option. --- Templates/MSBuild/FlagTables/v142_Link.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Templates/MSBuild/FlagTables/v142_Link.json b/Templates/MSBuild/FlagTables/v142_Link.json index acdb5ac..481468e 100644 --- a/Templates/MSBuild/FlagTables/v142_Link.json +++ b/Templates/MSBuild/FlagTables/v142_Link.json @@ -648,11 +648,7 @@ "switch": "MANIFESTUAC:NO", "comment": "Enable User Account Control (UAC)", "value": "false", - "flags": [ - "UserValue", - "UserIgnored", - "Continue" - ] + "flags": [] }, { "name": "EnableUAC", -- cgit v0.12 From 533f95c8479c6c04ec23263244671bd81a98ea39 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 13:03:53 -0500 Subject: VS: Map the link `/debug` flag for v142 Apply the changes from commit a5d9aa5063 (VS: Map the link `/debug` to its IDE property, 2018-11-21) and commit f77320c12a (VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL, 2018-11-21) to the v142 flag table. See commit ae44496e2b (VS: Fix GenerateDebugInformation values for v140 and v141 toolsets, 2017-06-27, v3.9.0-rc6~15^2~1) for explanation. --- Templates/MSBuild/FlagTables/v142_Link.json | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Templates/MSBuild/FlagTables/v142_Link.json b/Templates/MSBuild/FlagTables/v142_Link.json index 481468e..c4fd8e3 100644 --- a/Templates/MSBuild/FlagTables/v142_Link.json +++ b/Templates/MSBuild/FlagTables/v142_Link.json @@ -120,31 +120,39 @@ }, { "name": "GenerateDebugInformation", - "switch": "", - "comment": "No", - "value": "false", - "flags": [] - }, - { - "name": "GenerateDebugInformation", "switch": "DEBUG", "comment": "Generate Debug Information", "value": "true", - "flags": [] + "flags": [ + "CaseInsensitive" + ] }, { "name": "GenerateDebugInformation", "switch": "DEBUG:FASTLINK", "comment": "Generate Debug Information optimized for faster links", "value": "DebugFastLink", - "flags": [] + "flags": [ + "CaseInsensitive" + ] }, { "name": "GenerateDebugInformation", "switch": "DEBUG:FULL", "comment": "Generate Debug Information optimized for sharing and publishing", "value": "DebugFull", - "flags": [] + "flags": [ + "CaseInsensitive" + ] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG:NONE", + "comment": "Produces no debugging information", + "value": "false", + "flags": [ + "CaseInsensitive" + ] }, { "name": "SubSystem", -- cgit v0.12 From db35e3cfd606a156cbb518af19603da7f22c26d8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 13:11:14 -0500 Subject: VS: Fix support for '/guard:cf' linker flag for v142 Apply the change from commit 57a78b5526 (VS: Fix support for '/guard:cf' linker flag, 2018-11-21) to the v142 flag table. Although `$(VCTargetsPath)/1033/link.xml` contains an entry for `LinkControlFlowGuard`, it does not work when used in a `.vcxproj` file (at least as of v140 and v141). Drop our link flag table entries for these toolsets so that the flag will be passed via `AdditionalOptions`. --- Templates/MSBuild/FlagTables/v142_Link.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Templates/MSBuild/FlagTables/v142_Link.json b/Templates/MSBuild/FlagTables/v142_Link.json index c4fd8e3..d5144c8 100644 --- a/Templates/MSBuild/FlagTables/v142_Link.json +++ b/Templates/MSBuild/FlagTables/v142_Link.json @@ -547,13 +547,6 @@ "flags": [] }, { - "name": "LinkControlFlowGuard", - "switch": "guard:cf", - "comment": "Enable Security Check with Guard", - "value": "Guard", - "flags": [] - }, - { "name": "LinkIncremental", "switch": "INCREMENTAL:NO", "comment": "Enable Incremental Linking", -- cgit v0.12 From fd45cbf40ee809d6b900f22247fef06e3d349c78 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 13:15:49 -0500 Subject: VS: Fix `/MANIFESTUAC:` link flag mapping for v142 Apply the change from commit 454b47ba0b (VS: Fix MANIFESTUAC link flag map to .vcxproj elements, 2018-11-21) to the v142 flag table. Add special parsing of the flags given in `/MANIFESTUAC:"..."` in order to map them correctly to `.vcxproj` elements. Keep the old incorrect flag table entries for `uiAccess` and `level` flags for compatibility even though they do not really exist. --- Templates/MSBuild/FlagTables/v142_Link.json | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/Templates/MSBuild/FlagTables/v142_Link.json b/Templates/MSBuild/FlagTables/v142_Link.json index d5144c8..66ee76f 100644 --- a/Templates/MSBuild/FlagTables/v142_Link.json +++ b/Templates/MSBuild/FlagTables/v142_Link.json @@ -646,20 +646,13 @@ }, { "name": "EnableUAC", - "switch": "MANIFESTUAC:NO", - "comment": "Enable User Account Control (UAC)", - "value": "false", - "flags": [] - }, - { - "name": "EnableUAC", "switch": "MANIFESTUAC:", - "comment": "Enable User Account Control (UAC)", - "value": "true", + "comment": "", + "value": "", "flags": [ "UserValue", - "UserIgnored", - "Continue" + "UserRequired", + "SpaceAppendable" ] }, { @@ -674,16 +667,6 @@ }, { "name": "UACUIAccess", - "switch": "MANIFESTUAC:", - "comment": "UAC Bypass UI Protection", - "value": "true", - "flags": [ - "UserValue", - "UserRequired" - ] - }, - { - "name": "UACUIAccess", "switch": "uiAccess='false'", "comment": "UAC Bypass UI Protection", "value": "false", -- cgit v0.12 From 626c51f47be79c5438cc349f51ba1b4973194bfc Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jan 2019 11:19:18 -0500 Subject: VS: Update for Visual Studio 2019 Preview 2 The toolset is now called `v142`. Use matching flag tables. Fixes: #18834 --- Help/release/dev/vs2019.rst | 2 +- Source/cmGlobalVisualStudioVersionedGenerator.cxx | 3 +-- Source/cmVSSetupHelper.cxx | 10 +++++++++- Source/cmVisualStudio10ToolsetOptions.cxx | 22 ++++++++++++++++------ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Help/release/dev/vs2019.rst b/Help/release/dev/vs2019.rst index 1ffdeec..2072147 100644 --- a/Help/release/dev/vs2019.rst +++ b/Help/release/dev/vs2019.rst @@ -2,7 +2,7 @@ vs2019 ------ * The :generator:`Visual Studio 16 2019` generator was added. This is - experimental and based on "Visual Studio 2019 Preview 1.1" because this + experimental and based on "Visual Studio 2019 Preview 2" because this version of VS has not been released. The VS 2019 generator differs from generators for earlier versions diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index 31f585c..a83cc78 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -72,8 +72,7 @@ static const char* VSVersionToToolset( case cmGlobalVisualStudioGenerator::VS15: return "v141"; case cmGlobalVisualStudioGenerator::VS16: - // FIXME: VS 2019 Preview 1.1 uses v141 but preview 2 will use v142. - return "v141"; + return "v142"; } return ""; } diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index 9187c29..91a0e15 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -188,8 +188,16 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo( // Check if a compiler is installed with this instance. { std::string const vcRoot = vsInstanceInfo.GetInstallLocation(); - std::string const vcToolsVersionFile = + std::string vcToolsVersionFile = vcRoot + "/VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt"; + if (!cmSystemTools::PathExists(vcToolsVersionFile)) { + // FIXME: VS 2019 Preview 2 installs the v142 toolset and does not + // provide the plain `Microsoft.VCToolsVersion.default.txt` that v141 + // does. This should be fixed in preview 3 and this workaround can + // be dropped. Otherwise, we may need to switch to globbing. + vcToolsVersionFile = vcRoot + + "/VC/Auxiliary/Build/Microsoft.VCToolsVersion.v142.default.txt"; + } std::string vcToolsVersion; cmsys::ifstream fin(vcToolsVersionFile.c_str()); if (!fin || !cmSystemTools::GetLineFromStream(fin, vcToolsVersion)) { diff --git a/Source/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx index 39063ed..a490e03 100644 --- a/Source/cmVisualStudio10ToolsetOptions.cxx +++ b/Source/cmVisualStudio10ToolsetOptions.cxx @@ -11,7 +11,9 @@ std::string cmVisualStudio10ToolsetOptions::GetClFlagTableName( { std::string const useToolset = this->GetToolsetName(name, toolset); - if (toolset == "v141") { + if (toolset == "v142") { + return "v142"; + } else if (toolset == "v141") { return "v141"; } else if (useToolset == "v140") { return "v140"; @@ -31,7 +33,10 @@ std::string cmVisualStudio10ToolsetOptions::GetCSharpFlagTableName( { std::string const useToolset = this->GetToolsetName(name, toolset); - if ((useToolset == "v141")) { + if (useToolset == "v142") { + // FIXME: Add CSharp flag table for v142. + return "v141"; + } else if (useToolset == "v141") { return "v141"; } else if (useToolset == "v140") { return "v140"; @@ -51,7 +56,8 @@ std::string cmVisualStudio10ToolsetOptions::GetRcFlagTableName( { std::string const useToolset = this->GetToolsetName(name, toolset); - if ((useToolset == "v140") || (useToolset == "v141")) { + if ((useToolset == "v140") || (useToolset == "v141") || + (useToolset == "v142")) { return "v14"; } else if (useToolset == "v120") { return "v12"; @@ -69,7 +75,8 @@ std::string cmVisualStudio10ToolsetOptions::GetLibFlagTableName( { std::string const useToolset = this->GetToolsetName(name, toolset); - if ((useToolset == "v140") || (useToolset == "v141")) { + if ((useToolset == "v140") || (useToolset == "v141") || + (useToolset == "v142")) { return "v14"; } else if (useToolset == "v120") { return "v12"; @@ -87,7 +94,9 @@ std::string cmVisualStudio10ToolsetOptions::GetLinkFlagTableName( { std::string const useToolset = this->GetToolsetName(name, toolset); - if (useToolset == "v141") { + if (useToolset == "v142") { + return "v142"; + } else if (useToolset == "v141") { return "v141"; } else if (useToolset == "v140") { return "v140"; @@ -107,7 +116,8 @@ std::string cmVisualStudio10ToolsetOptions::GetMasmFlagTableName( { std::string const useToolset = this->GetToolsetName(name, toolset); - if ((useToolset == "v140") || (useToolset == "v141")) { + if ((useToolset == "v140") || (useToolset == "v141") || + (useToolset == "v142")) { return "v14"; } else if (useToolset == "v120") { return "v12"; -- cgit v0.12