public static string Option(this CppStandardVersion version) { switch (version) { case CppStandardVersion.cpp98: return(" -std=c++98"); case CppStandardVersion.gnu98: return(" -std=gnu++98"); case CppStandardVersion.cpp11: return(" -std=c++11"); case CppStandardVersion.gnu11: return(" -std=gnu++11"); case CppStandardVersion.cpp14: return(" -std=c++14"); case CppStandardVersion.gnu14: return(" -std=gnu++14"); case CppStandardVersion.cpp17: return(" -std=c++17"); case CppStandardVersion.gnu17: return(" -std=gnu++17"); case CppStandardVersion.cpp2a: return(" -std=c++2a"); case CppStandardVersion.gnu2a: return(" -std=gnu++2a"); default: return(" -std=gnu++2a"); } }
/// <summary> /// Copy constructor. /// </summary> /// <param name="Other">Environment to copy settings from</param> public CppCompileEnvironment(CppCompileEnvironment Other) { Platform = Other.Platform; Configuration = Other.Configuration; Architecture = Other.Architecture; MetadataCache = Other.MetadataCache; SharedPCHs = Other.SharedPCHs; PrecompiledHeaderIncludeFilename = Other.PrecompiledHeaderIncludeFilename; PrecompiledHeaderAction = Other.PrecompiledHeaderAction; bUseSharedBuildEnvironment = Other.bUseSharedBuildEnvironment; bUseRTTI = Other.bUseRTTI; bUseInlining = Other.bUseInlining; bCompileISPC = Other.bCompileISPC; bUseAVX = Other.bUseAVX; bUseUnity = Other.bUseUnity; MinSourceFilesForUnityBuildOverride = Other.MinSourceFilesForUnityBuildOverride; MinFilesUsingPrecompiledHeaderOverride = Other.MinFilesUsingPrecompiledHeaderOverride; bBuildLocallyWithSNDBS = Other.bBuildLocallyWithSNDBS; bEnableExceptions = Other.bEnableExceptions; bEnableObjCExceptions = Other.bEnableObjCExceptions; ShadowVariableWarningLevel = Other.ShadowVariableWarningLevel; UnsafeTypeCastWarningLevel = Other.UnsafeTypeCastWarningLevel; bUndefinedIdentifierWarningsAsErrors = Other.bUndefinedIdentifierWarningsAsErrors; bEnableUndefinedIdentifierWarnings = Other.bEnableUndefinedIdentifierWarnings; bOptimizeCode = Other.bOptimizeCode; bOptimizeForSize = Other.bOptimizeForSize; bCreateDebugInfo = Other.bCreateDebugInfo; bIsBuildingLibrary = Other.bIsBuildingLibrary; bIsBuildingDLL = Other.bIsBuildingDLL; bUseStaticCRT = Other.bUseStaticCRT; bUseDebugCRT = Other.bUseDebugCRT; bOmitFramePointers = Other.bOmitFramePointers; bEnableOSX109Support = Other.bEnableOSX109Support; bUsePDBFiles = Other.bUsePDBFiles; bPreprocessOnly = Other.bPreprocessOnly; bSupportEditAndContinue = Other.bSupportEditAndContinue; bUseIncrementalLinking = Other.bUseIncrementalLinking; bAllowLTCG = Other.bAllowLTCG; bPGOOptimize = Other.bPGOOptimize; bPGOProfile = Other.bPGOProfile; PGOFilenamePrefix = Other.PGOFilenamePrefix; PGODirectory = Other.PGODirectory; bPrintTimingInfo = Other.bPrintTimingInfo; bGenerateDependenciesFile = Other.bGenerateDependenciesFile; bAllowRemotelyCompiledPCHs = Other.bAllowRemotelyCompiledPCHs; UserIncludePaths = new HashSet <DirectoryReference>(Other.UserIncludePaths); SystemIncludePaths = new HashSet <DirectoryReference>(Other.SystemIncludePaths); bCheckSystemHeadersForModification = Other.bCheckSystemHeadersForModification; ForceIncludeFiles.AddRange(Other.ForceIncludeFiles); AdditionalPrerequisites.AddRange(Other.AdditionalPrerequisites); Definitions.AddRange(Other.Definitions); AdditionalArguments = Other.AdditionalArguments; AdditionalFrameworks.AddRange(Other.AdditionalFrameworks); PrecompiledHeaderFile = Other.PrecompiledHeaderFile; bHackHeaderGenerator = Other.bHackHeaderGenerator; bHideSymbolsByDefault = Other.bHideSymbolsByDefault; CppStandard = Other.CppStandard; }
/// <summary> /// Sets highest C++ version which is used in this project /// </summary> /// <param name="CppVersion">Version</param> public void SetIntelliSenseCppVersion(CppStandardVersion CppVersion) { if (CppVersion != CppStandardVersion.Default) { if (CppVersion > IntelliSenseCppVersion) { IntelliSenseCppVersion = CppVersion; } } }