From 25a99d478078a6cf5c2fff48992080ea9d1a2cca Mon Sep 17 00:00:00 2001 From: Lambert Clara Date: Mon, 15 Feb 2021 12:21:28 +0100 Subject: [PATCH] Formatting --- Sharpmake.Generators/FastBuild/Bff.Util.cs | 60 ++++++------ .../VisualStudio/ProjectOptionsGenerator.cs | 6 +- Sharpmake/FastBuildSettings.cs | 2 +- Sharpmake/Project.Configuration.cs | 2 +- Sharpmake/Target.cs | 92 +++++++++---------- .../HelloLinux.CommonProject.sharpmake.cs | 2 +- .../HelloXCode.CommonProject.sharpmake.cs | 2 +- 7 files changed, 83 insertions(+), 83 deletions(-) diff --git a/Sharpmake.Generators/FastBuild/Bff.Util.cs b/Sharpmake.Generators/FastBuild/Bff.Util.cs index d9f118a93..643e709d6 100644 --- a/Sharpmake.Generators/FastBuild/Bff.Util.cs +++ b/Sharpmake.Generators/FastBuild/Bff.Util.cs @@ -25,22 +25,22 @@ public partial class Bff { public class Unity { - public string UnityName = string.Empty; // Name of unity - public string UnityOutputPath = string.Empty; // Path to output generated Unity files - public string UnityInputPath = FileGeneratorUtilities.RemoveLineTag; // (optional) Path (or paths) to find files - public string UnityInputExcludePath = FileGeneratorUtilities.RemoveLineTag; // (optional) Path (or paths) in which to ignore files - public string UnityInputExcludePattern = FileGeneratorUtilities.RemoveLineTag; // (optional) Wildcard pattern(s) of files/folders to exclude - public string UnityInputPattern = FileGeneratorUtilities.RemoveLineTag; // (optional) Pattern(s) of files to find (default *cpp) - public string UnityInputPathRecurse = FileGeneratorUtilities.RemoveLineTag; // (optional) Recurse when searching for files (default true) - public string UnityInputFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Explicit list of files to include - public string UnityInputExcludedFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Explicit list of excluded files (partial, root-relative of full path) - public string UnityInputObjectLists = FileGeneratorUtilities.RemoveLineTag; // (optional) ObjectList(s) to use as input - public string UnityInputIsolateWritableFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Build writable files individually (default false) + public string UnityName = string.Empty; // Name of unity + public string UnityOutputPath = string.Empty; // Path to output generated Unity files + public string UnityInputPath = FileGeneratorUtilities.RemoveLineTag; // (optional) Path (or paths) to find files + public string UnityInputExcludePath = FileGeneratorUtilities.RemoveLineTag; // (optional) Path (or paths) in which to ignore files + public string UnityInputExcludePattern = FileGeneratorUtilities.RemoveLineTag; // (optional) Wildcard pattern(s) of files/folders to exclude + public string UnityInputPattern = FileGeneratorUtilities.RemoveLineTag; // (optional) Pattern(s) of files to find (default *cpp) + public string UnityInputPathRecurse = FileGeneratorUtilities.RemoveLineTag; // (optional) Recurse when searching for files (default true) + public string UnityInputFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Explicit list of files to include + public string UnityInputExcludedFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Explicit list of excluded files (partial, root-relative of full path) + public string UnityInputObjectLists = FileGeneratorUtilities.RemoveLineTag; // (optional) ObjectList(s) to use as input + public string UnityInputIsolateWritableFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Build writable files individually (default false) public string UnityInputIsolateWritableFilesLimit = FileGeneratorUtilities.RemoveLineTag; // (optional) Disable isolation when many files are writable (default 0) - public string UnityOutputPattern = FileGeneratorUtilities.RemoveLineTag; // (optional) Pattern of output Unity file names (default Unity*cpp) - public string UnityNumFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Number of Unity files to generate (default 1) - public string UnityPCH = FileGeneratorUtilities.RemoveLineTag; // (optional) Precompiled Header file to add to generated Unity files - public string UseRelativePaths = FileGeneratorUtilities.RemoveLineTag; // (optional) Use relative paths for generated Unity files + public string UnityOutputPattern = FileGeneratorUtilities.RemoveLineTag; // (optional) Pattern of output Unity file names (default Unity*cpp) + public string UnityNumFiles = FileGeneratorUtilities.RemoveLineTag; // (optional) Number of Unity files to generate (default 1) + public string UnityPCH = FileGeneratorUtilities.RemoveLineTag; // (optional) Precompiled Header file to add to generated Unity files + public string UseRelativePaths = FileGeneratorUtilities.RemoveLineTag; // (optional) Use relative paths for generated Unity files public const string DefaultUnityInputPatternExtension = ".cpp"; @@ -81,22 +81,22 @@ public override bool Equals(object obj) private bool Equals(Unity unity) { - return string.Equals(UnityName, unity.UnityName) - && string.Equals(UnityOutputPath, unity.UnityOutputPath) - && string.Equals(UnityInputPath, unity.UnityInputPath) - && string.Equals(UnityInputExcludePath, unity.UnityInputExcludePath) - && string.Equals(UnityInputExcludePattern, unity.UnityInputExcludePattern) - && string.Equals(UnityInputPattern, unity.UnityInputPattern) - && string.Equals(UnityInputPathRecurse, unity.UnityInputPathRecurse) - && string.Equals(UnityInputFiles, unity.UnityInputFiles) - && string.Equals(UnityInputExcludedFiles, unity.UnityInputExcludedFiles) - && string.Equals(UnityInputObjectLists, unity.UnityInputObjectLists) - && string.Equals(UnityInputIsolateWritableFiles, unity.UnityInputIsolateWritableFiles) + return string.Equals(UnityName, unity.UnityName) + && string.Equals(UnityOutputPath, unity.UnityOutputPath) + && string.Equals(UnityInputPath, unity.UnityInputPath) + && string.Equals(UnityInputExcludePath, unity.UnityInputExcludePath) + && string.Equals(UnityInputExcludePattern, unity.UnityInputExcludePattern) + && string.Equals(UnityInputPattern, unity.UnityInputPattern) + && string.Equals(UnityInputPathRecurse, unity.UnityInputPathRecurse) + && string.Equals(UnityInputFiles, unity.UnityInputFiles) + && string.Equals(UnityInputExcludedFiles, unity.UnityInputExcludedFiles) + && string.Equals(UnityInputObjectLists, unity.UnityInputObjectLists) + && string.Equals(UnityInputIsolateWritableFiles, unity.UnityInputIsolateWritableFiles) && string.Equals(UnityInputIsolateWritableFilesLimit, unity.UnityInputIsolateWritableFilesLimit) - && string.Equals(UnityOutputPattern, unity.UnityOutputPattern) - && string.Equals(UnityNumFiles, unity.UnityNumFiles) - && string.Equals(UnityPCH, unity.UnityPCH) - && string.Equals(UseRelativePaths, unity.UseRelativePaths); + && string.Equals(UnityOutputPattern, unity.UnityOutputPattern) + && string.Equals(UnityNumFiles, unity.UnityNumFiles) + && string.Equals(UnityPCH, unity.UnityPCH) + && string.Equals(UseRelativePaths, unity.UseRelativePaths); } } diff --git a/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs b/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs index 7b1544f52..f63e8193d 100644 --- a/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs +++ b/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs @@ -376,8 +376,8 @@ private void GenerateCompilerOptions(IGenerationContext context, ProjectOptionsG context.SelectOption ( Options.Option(Options.Vc.Compiler.CLanguageStandard.Legacy, () => { context.Options["LanguageStandard_C"] = FileGeneratorUtilities.RemoveLineTag; context.CommandLineOptions["LanguageStandard_C"] = FileGeneratorUtilities.RemoveLineTag; }), - Options.Option(Options.Vc.Compiler.CLanguageStandard.C11, () => { context.Options["LanguageStandard_C"] = "stdc11"; context.CommandLineOptions["LanguageStandard_C"] = "/std:c11"; }), - Options.Option(Options.Vc.Compiler.CLanguageStandard.C17, () => { context.Options["LanguageStandard_C"] = "stdc17"; context.CommandLineOptions["LanguageStandard_C"] = "/std:c17"; }) + Options.Option(Options.Vc.Compiler.CLanguageStandard.C11, () => { context.Options["LanguageStandard_C"] = "stdc11"; context.CommandLineOptions["LanguageStandard_C"] = "/std:c11"; }), + Options.Option(Options.Vc.Compiler.CLanguageStandard.C17, () => { context.Options["LanguageStandard_C"] = "stdc17"; context.CommandLineOptions["LanguageStandard_C"] = "/std:c17"; }) ); } @@ -1086,7 +1086,7 @@ public static List> ConvertPostBuildCopiesToRelativ relativePostBuildCopies.AddRange(conf.ResolvedTargetCopyFiles.Select(x => new KeyValuePair(x, conf.TargetPath))); relativePostBuildCopies.AddRange(conf.EventPostBuildCopies); relativePostBuildCopies.AddRange(conf.ResolvedTargetCopyFilesToSubDirectory.Select(x => new KeyValuePair(x.Key, Path.Combine(conf.TargetPath, x.Value)))); - + for (int i = 0; i < relativePostBuildCopies.Count;) { string sourceFileFullPath = relativePostBuildCopies[i].Key; diff --git a/Sharpmake/FastBuildSettings.cs b/Sharpmake/FastBuildSettings.cs index cdf4a200e..b5759cb84 100644 --- a/Sharpmake/FastBuildSettings.cs +++ b/Sharpmake/FastBuildSettings.cs @@ -199,6 +199,6 @@ public enum CacheTypes /// /// Additional settings to add to the Compiler node, keyed by compiler name. /// - public static readonly IDictionary> AdditionalCompilerSettings = new Dictionary>(StringComparer.OrdinalIgnoreCase); + public static readonly IDictionary> AdditionalCompilerSettings = new Dictionary>(StringComparer.OrdinalIgnoreCase); } } diff --git a/Sharpmake/Project.Configuration.cs b/Sharpmake/Project.Configuration.cs index bb831466c..3b2943255 100644 --- a/Sharpmake/Project.Configuration.cs +++ b/Sharpmake/Project.Configuration.cs @@ -2866,7 +2866,7 @@ internal void Link(Builder builder) _resolvedTargetDependsFiles.AddRange(dependency.TargetDependsFiles); _resolvedExecDependsFiles.AddRange(dependency.EventPreBuildExe); _resolvedExecDependsFiles.AddRange(dependency.EventPostBuildExe); - + foreach (var keyValuePair in dependency.TargetCopyFilesToSubDirectory) { _resolvedTargetCopyFilesToSubDirectory.Add(keyValuePair); diff --git a/Sharpmake/Target.cs b/Sharpmake/Target.cs index 1c5801a3a..744d0931f 100644 --- a/Sharpmake/Target.cs +++ b/Sharpmake/Target.cs @@ -85,23 +85,23 @@ public enum DevEnv [Fragment, Flags] public enum Platform { - win32 = 1 << 0, - win64 = 1 << 1, - anycpu = 1 << 2, - x360 = 1 << 3, - durango = 1 << 4, - ps3 = 1 << 5, - ps3spu = 1 << 6, - orbis = 1 << 7, - wii = 1 << 8, - wiiu = 1 << 9, - nx = 1 << 10, - nvshield = 1 << 11, - ctr = 1 << 12, - ios = 1 << 13, - android = 1 << 14, - linux = 1 << 15, - mac = 1 << 16, + win32 = 1 << 0, + win64 = 1 << 1, + anycpu = 1 << 2, + x360 = 1 << 3, + durango = 1 << 4, + ps3 = 1 << 5, + ps3spu = 1 << 6, + orbis = 1 << 7, + wii = 1 << 8, + wiiu = 1 << 9, + nx = 1 << 10, + nvshield = 1 << 11, + ctr = 1 << 12, + ios = 1 << 13, + android = 1 << 14, + linux = 1 << 15, + mac = 1 << 16, _reserved9 = 1 << 22, _reserved8 = 1 << 23, @@ -144,37 +144,37 @@ public enum DotNetFramework [Obsolete("Please use at least .net framework 3.5.", error: false)] v3 = v3_5, - v3_5 = 1 << 0, + v3_5 = 1 << 0, v3_5clientprofile = 1 << 1, - v4_0 = 1 << 2, - v4_5 = 1 << 3, - v4_5_1 = 1 << 4, - v4_5_2 = 1 << 5, + v4_0 = 1 << 2, + v4_5 = 1 << 3, + v4_5_1 = 1 << 4, + v4_5_2 = 1 << 5, v4_5clientprofile = 1 << 6, - v4_6 = 1 << 7, - v4_6_1 = 1 << 8, - v4_6_2 = 1 << 9, - v4_7 = 1 << 10, - v4_7_1 = 1 << 11, - v4_7_2 = 1 << 12, - v4_8 = 1 << 13, - netcore1_0 = 1 << 14, - netcore1_1 = 1 << 15, - netcore2_0 = 1 << 16, - netcore2_1 = 1 << 17, - netcore2_2 = 1 << 18, - netcore3_0 = 1 << 19, - netcore3_1 = 1 << 20, - net5_0 = 1 << 21, - netstandard1_0 = 1 << 22, - netstandard1_1 = 1 << 23, - netstandard1_2 = 1 << 24, - netstandard1_3 = 1 << 25, - netstandard1_4 = 1 << 26, - netstandard1_5 = 1 << 27, - netstandard1_6 = 1 << 28, - netstandard2_0 = 1 << 29, - netstandard2_1 = 1 << 30, + v4_6 = 1 << 7, + v4_6_1 = 1 << 8, + v4_6_2 = 1 << 9, + v4_7 = 1 << 10, + v4_7_1 = 1 << 11, + v4_7_2 = 1 << 12, + v4_8 = 1 << 13, + netcore1_0 = 1 << 14, + netcore1_1 = 1 << 15, + netcore2_0 = 1 << 16, + netcore2_1 = 1 << 17, + netcore2_2 = 1 << 18, + netcore3_0 = 1 << 19, + netcore3_1 = 1 << 20, + net5_0 = 1 << 21, + netstandard1_0 = 1 << 22, + netstandard1_1 = 1 << 23, + netstandard1_2 = 1 << 24, + netstandard1_3 = 1 << 25, + netstandard1_4 = 1 << 26, + netstandard1_5 = 1 << 27, + netstandard1_6 = 1 << 28, + netstandard2_0 = 1 << 29, + netstandard2_1 = 1 << 30, [CompositeFragment] all_netframework = v3_5 | v3_5clientprofile | v4_0 | v4_5 | v4_5_1 | v4_5_2 | v4_5clientprofile | v4_6 | v4_6_1 | v4_6_2 | v4_7 | v4_7_1 | v4_7_2 | v4_8, diff --git a/samples/HelloLinux/HelloLinux.CommonProject.sharpmake.cs b/samples/HelloLinux/HelloLinux.CommonProject.sharpmake.cs index 836bdbf29..cf514a6bf 100644 --- a/samples/HelloLinux/HelloLinux.CommonProject.sharpmake.cs +++ b/samples/HelloLinux/HelloLinux.CommonProject.sharpmake.cs @@ -61,7 +61,7 @@ public virtual void ConfigureAll(Configuration conf, CommonTarget target) // different names per configurations to work properly... //conf.TargetFileName += "_" + target.Optimization.ToString().ToLowerInvariant().First(); // suffix with lowered first letter of optim //if (conf.IsFastBuild) - //conf.TargetFileName += "x"; + //conf.TargetFileName += "x"; conf.Output = Configuration.OutputType.Lib; // defaults to creating static libs } diff --git a/samples/HelloXCode/HelloXCode.CommonProject.sharpmake.cs b/samples/HelloXCode/HelloXCode.CommonProject.sharpmake.cs index 338162e78..8543868df 100644 --- a/samples/HelloXCode/HelloXCode.CommonProject.sharpmake.cs +++ b/samples/HelloXCode/HelloXCode.CommonProject.sharpmake.cs @@ -61,7 +61,7 @@ public virtual void ConfigureAll(Configuration conf, CommonTarget target) // different names per configurations to work properly... //conf.TargetFileName += "_" + target.Optimization.ToString().ToLowerInvariant().First(); // suffix with lowered first letter of optim //if (conf.IsFastBuild) - //conf.TargetFileName += "x"; + //conf.TargetFileName += "x"; conf.Output = Configuration.OutputType.Lib; // defaults to creating static libs }