Skip to content

Commit

Permalink
Merge branch 'autoconvert-obsolete' into 'main'
Browse files Browse the repository at this point in the history
Transform recent obsolete change with error in warning for now

See merge request Sharpmake/sharpmake!463
  • Loading branch information
jspelletier committed Sep 27, 2023
2 parents 909c4a0 + 39f5b75 commit 538be41
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Sharpmake.Generators/VisualStudio/Vcxproj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,13 @@ public void Generate(Builder builder, Project project, List<Project.Configuratio
GenerateImpl(context, generatedFiles, skipFiles);
}

[Obsolete("Deprecated. Use `FastBuildSettings.FastBuildCustomArguments` instead.", error: true)]
public static string FastBuildCustomArguments = "";
[Obsolete("Deprecated. Use `FastBuildSettings.FastBuildCustomArguments` instead.", error: false)]
public static string FastBuildCustomArguments
{
get { return FastBuildSettings.FastBuildCustomArguments; }
set { FastBuildSettings.FastBuildCustomArguments = value; }
}

public const string ProjectExtension = ".vcxproj";
private const string ProjectFilterExtension = ".filters";
private const string CopyDependenciesExtension = "_runtimedependencies.txt";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,16 @@ public virtual void SelectCompilerOptions(IGenerationContext context)
Options.Option(Options.XCode.Compiler.EnableBitcode.Enable, () => { options["EnableBitcode"] = "YES"; })
);

#pragma warning disable 618 // obsolete warning
// Convert options - Temporary measure
context.SelectOption(
Options.Option(Options.XCode.Compiler.Exceptions.Disable, () => { conf.Options.Add(Options.XCode.Compiler.CppExceptions.Disable); conf.Options.Add(Options.XCode.Compiler.ObjCExceptions.Disable); }),
Options.Option(Options.XCode.Compiler.Exceptions.Enable, () => { conf.Options.Add(Options.XCode.Compiler.CppExceptions.Enable); conf.Options.Add(Options.XCode.Compiler.ObjCExceptions.Enable); }),
Options.Option(Options.XCode.Compiler.Exceptions.EnableCpp, () => { conf.Options.Add(Options.XCode.Compiler.CppExceptions.Enable); conf.Options.Add(Options.XCode.Compiler.ObjCExceptions.Disable); }),
Options.Option(Options.XCode.Compiler.Exceptions.EnableObjC, () => { conf.Options.Add(Options.XCode.Compiler.CppExceptions.Disable); conf.Options.Add(Options.XCode.Compiler.ObjCExceptions.Enable); })
);
#pragma warning restore 618

context.SelectOption(
Options.Option(Options.XCode.Compiler.CppExceptions.Disable, () => { options["CppExceptionHandling"] = "NO"; cmdLineOptions["CppExceptions"] = FileGeneratorUtilities.RemoveLineTag; }),
Options.Option(Options.XCode.Compiler.CppExceptions.Enable, () => { options["CppExceptionHandling"] = "YES"; cmdLineOptions["CppExceptions"] = "-fcxx-exceptions"; })
Expand Down
2 changes: 1 addition & 1 deletion Sharpmake/Options.XCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public enum EnableBitcode
Disable
}

[Obsolete("Deprecated. Use `CppExceptions`, `ObjCExceptions`, or `ObjCARCExceptions` instead.", error: true)]
[Obsolete("Deprecated. Use `CppExceptions`, `ObjCExceptions`, or `ObjCARCExceptions` instead.", error: false)]
public enum Exceptions
{
[Default]
Expand Down

0 comments on commit 538be41

Please sign in to comment.