From 257106d840a8cddb20938675fffb5bfd38eb8f39 Mon Sep 17 00:00:00 2001 From: DESKTOP-C3TDPII Date: Thu, 19 Oct 2023 20:25:23 +0900 Subject: [PATCH 1/5] - Support UnityBuild --- .../VisualStudio/ProjectOptionsGenerator.cs | 10 ++++++++++ .../BasePlatform.Vcxproj.Template.cs | 9 ++++++++- Sharpmake/Options.Vc.cs | 14 ++++++++++++++ Sharpmake/Project.Configuration.cs | 3 +++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs b/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs index b8038237e..9d7f981ea 100644 --- a/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs +++ b/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs @@ -1052,6 +1052,16 @@ private void GenerateCompilerOptions(IGenerationContext context, ProjectOptionsG Options.Option(Options.Vc.Compiler.EnableAsan.Enable, () => { context.Options["EnableASAN"] = "true"; context.CommandLineOptions["EnableASAN"] = "/fsanitize=address"; }) ); + context.SelectOption + ( + Options.Option(Options.Vc.Compiler.JumboBuild.Disable, () => { context.Options["JumboBuild"] = FileGeneratorUtilities.RemoveLineTag; context.Options["MaxFilesPerUnityFile"] = FileGeneratorUtilities.RemoveLineTag; }), + Options.Option(Options.Vc.Compiler.JumboBuild.Enable, () => + { + context.Options["JumboBuild"] = "true"; + context.Options["MaxFilesPerUnityFile"] = context.Configuration.MaxFilesPerUnityFile.ToString(); + }) + ); + if (context.DevelopmentEnvironment.IsVisualStudio() && context.DevelopmentEnvironment >= DevEnv.vs2017) { //Options.Vc.Compiler.DefineCPlusPlus. See: https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs index 6d25d52b7..373977521 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs @@ -180,7 +180,14 @@ public abstract partial class BasePlatform [options.WindowsTargetPlatformVersion] [options.SpectreMitigation] [options.EnableASAN] - + [options.JumboBuild] + True + [options.MaxFilesPerUnityFile] + 2> + 1 + 100 + . + "; private const string _projectConfigurationsGeneral2 = diff --git a/Sharpmake/Options.Vc.cs b/Sharpmake/Options.Vc.cs index f2f776fb8..86adebad3 100644 --- a/Sharpmake/Options.Vc.cs +++ b/Sharpmake/Options.Vc.cs @@ -1348,6 +1348,20 @@ public enum EnableAsan [DevEnvVersion(minimum = DevEnv.vs2019)] Enable } + + /// + /// Enable Jumbo/Unity builds + /// + /// + /// Merges multiple translation units together + /// + public enum JumboBuild + { + [Default] + Disable, + [DevEnvVersion(minimum = DevEnv.vs2019)] + Enable + } } public static class CodeAnalysis diff --git a/Sharpmake/Project.Configuration.cs b/Sharpmake/Project.Configuration.cs index 49481db24..d98047456 100644 --- a/Sharpmake/Project.Configuration.cs +++ b/Sharpmake/Project.Configuration.cs @@ -1605,6 +1605,9 @@ public string FastBuildUnityPath /// public bool DoNotGenerateFastBuild = false; + // Unity builds support + public int MaxFilesPerUnityFile = 0; + // container for executable /// /// Represents a build step that invokes an executable on the file system. From d853a5f5b6ce3f8213cfe45031b5ba4942b20265 Mon Sep 17 00:00:00 2001 From: DESKTOP-C3TDPII Date: Thu, 19 Oct 2023 20:54:26 +0900 Subject: [PATCH 2/5] - fix for regression_test --- .../VisualStudio/ProjectOptionsGenerator.cs | 10 ++++++++++ .../BasePlatform.Vcxproj.Template.cs | 2 ++ Sharpmake/Options.Vc.cs | 14 ++++++++++++++ Sharpmake/Project.Configuration.cs | 3 +++ 4 files changed, 29 insertions(+) diff --git a/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs b/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs index b8038237e..9d7f981ea 100644 --- a/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs +++ b/Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs @@ -1052,6 +1052,16 @@ private void GenerateCompilerOptions(IGenerationContext context, ProjectOptionsG Options.Option(Options.Vc.Compiler.EnableAsan.Enable, () => { context.Options["EnableASAN"] = "true"; context.CommandLineOptions["EnableASAN"] = "/fsanitize=address"; }) ); + context.SelectOption + ( + Options.Option(Options.Vc.Compiler.JumboBuild.Disable, () => { context.Options["JumboBuild"] = FileGeneratorUtilities.RemoveLineTag; context.Options["MaxFilesPerUnityFile"] = FileGeneratorUtilities.RemoveLineTag; }), + Options.Option(Options.Vc.Compiler.JumboBuild.Enable, () => + { + context.Options["JumboBuild"] = "true"; + context.Options["MaxFilesPerUnityFile"] = context.Configuration.MaxFilesPerUnityFile.ToString(); + }) + ); + if (context.DevelopmentEnvironment.IsVisualStudio() && context.DevelopmentEnvironment >= DevEnv.vs2017) { //Options.Vc.Compiler.DefineCPlusPlus. See: https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs index 6d25d52b7..f34504741 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/BasePlatform.Vcxproj.Template.cs @@ -180,6 +180,8 @@ public abstract partial class BasePlatform [options.WindowsTargetPlatformVersion] [options.SpectreMitigation] [options.EnableASAN] + [options.JumboBuild] + [options.MaxFilesPerUnityFile] "; diff --git a/Sharpmake/Options.Vc.cs b/Sharpmake/Options.Vc.cs index f2f776fb8..86adebad3 100644 --- a/Sharpmake/Options.Vc.cs +++ b/Sharpmake/Options.Vc.cs @@ -1348,6 +1348,20 @@ public enum EnableAsan [DevEnvVersion(minimum = DevEnv.vs2019)] Enable } + + /// + /// Enable Jumbo/Unity builds + /// + /// + /// Merges multiple translation units together + /// + public enum JumboBuild + { + [Default] + Disable, + [DevEnvVersion(minimum = DevEnv.vs2019)] + Enable + } } public static class CodeAnalysis diff --git a/Sharpmake/Project.Configuration.cs b/Sharpmake/Project.Configuration.cs index 49481db24..d98047456 100644 --- a/Sharpmake/Project.Configuration.cs +++ b/Sharpmake/Project.Configuration.cs @@ -1605,6 +1605,9 @@ public string FastBuildUnityPath /// public bool DoNotGenerateFastBuild = false; + // Unity builds support + public int MaxFilesPerUnityFile = 0; + // container for executable /// /// Represents a build step that invokes an executable on the file system. From 11408392cabdec8f51a98d4b6e023000562fa81f Mon Sep 17 00:00:00 2001 From: DESKTOP-C3TDPII Date: Wed, 1 Nov 2023 11:17:09 +0900 Subject: [PATCH 3/5] =?UTF-8?q?-=20development=20=EB=93=B1=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Properties/launchSettings.json | 317 +++++++++--------- .../Sharpmake.Application.csproj | 8 + Sharpmake/Project.Configuration.cs | 6 +- Sharpmake/Project.cs | 4 +- Sharpmake/Target.cs | 31 ++ 5 files changed, 200 insertions(+), 166 deletions(-) diff --git a/Sharpmake.Application/Properties/launchSettings.json b/Sharpmake.Application/Properties/launchSettings.json index 463c0e209..4d15c9d58 100644 --- a/Sharpmake.Application/Properties/launchSettings.json +++ b/Sharpmake.Application/Properties/launchSettings.json @@ -1,164 +1,157 @@ { - "profiles": { - // Samples - "Sample (CompileCommandDatabase)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CompileCommandDatabase.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CompileCommandDatabase" - }, - "Sample (ConfigureOrder)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\ConfigureOrder" - }, - "Sample (CPPCLI)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CLRTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CPPCLI" - }, - "Sample (CSharpHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpHelloWorld" - }, - "Sample (CSharpImports)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CSharpImports.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpImports" - }, - "Sample (CSharpVsix)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CSharpVsix.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpVsix" - }, - "Sample (CSharpWCF)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CSharpWCF.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpWCF" - }, - "Sample (CustomBuildStep)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CustomBuildStep.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CustomBuildStep" - }, - "Sample (FastBuildSimpleExecutable)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027FastBuildSimpleExecutable.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\FastBuildSimpleExecutable" - }, - "Sample (HelloAndroid)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloAndroid.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroid" - }, - "Sample (HelloAndroidAgde)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloAndroidAgde.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroidAgde" - }, - "Sample (HelloClangCl)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloClangCl.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloClangCl" - }, - "Sample (HelloEvents)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloEvents.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloEvents" - }, - "Sample (HelloLinux)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloLinux.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloLinux" - }, - "Sample (HelloRust)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloRust.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloRust" - }, - "Sample (HelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloWorld" - }, - "Sample (HelloXCode)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloXCode.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloXCode" - }, - "Sample (NetCore/DotNetCoreFrameworkHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetCoreFrameworkHelloWorld" - }, - "Sample (NetCore/DotNetFrameworkHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetFrameworkHelloWorld" - }, - "Sample (NetCore/DotNetMultiFrameworksHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetMultiFrameworksHelloWorld" - }, - "Sample (NetCore/DotNetOSMultiFrameworksHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetOSMultiFrameworksHelloWorld" - }, - "Sample (PackageReferences)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027PackageReferences.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\PackageReferences" - }, - "Sample (QTFileCustomBuild)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027QTFileCustomBuild.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\QTFileCustomBuild" - }, - "Sample (SimpleExeLibDependency)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027SimpleExeLibDependency.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\SimpleExeLibDependency" - }, - "Sample (vcpkg)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\vcpkg\\sharpmake" - }, - - // FunctionalTest - "FunctionalTest (FastBuildFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027FastBuildFunctionalTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\FastBuildFunctionalTest" - }, - "FunctionalTest (NoAllFastBuildProjectFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027NoAllFastBuildProjectFunctionalTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\NoAllFastBuildProjectFunctionalTest" - }, - "FunctionalTest (OnlyNeededFastBuildTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027OnlyNeededFastBuildTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\OnlyNeededFastBuildTest" - }, - "FunctionalTest (SharpmakePackageFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027SharpmakePackageFunctionalTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\SharpmakePackageFunctionalTest" - }, - - // Python scripts - "FunctionalTest (functional_test.py)": { - "commandName": "Executable", - "executablePath": "python", - "commandLineArgs": "$(ProjectDir)\\..\\functional_test.py" - }, - "FunctionalTest (regression_test.py)": { - "commandName": "Executable", - "executablePath": "python", - "commandLineArgs": "$(ProjectDir)\\..\\regression_test.py" - } + "profiles": { + "Sample (CompileCommandDatabase)": { + "commandName": "Project" + }, + "Sample (ConfigureOrder)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\ConfigureOrder" + }, + "Sample (CPPCLI)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CLRTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CPPCLI" + }, + "Sample (CSharpHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpHelloWorld" + }, + "Sample (CSharpImports)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CSharpImports.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpImports" + }, + "Sample (CSharpVsix)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CSharpVsix.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpVsix" + }, + "Sample (CSharpWCF)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CSharpWCF.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpWCF" + }, + "Sample (CustomBuildStep)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CustomBuildStep.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CustomBuildStep" + }, + "Sample (FastBuildSimpleExecutable)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'FastBuildSimpleExecutable.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\FastBuildSimpleExecutable" + }, + "Sample (HelloAndroid)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloAndroid.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroid" + }, + "Sample (HelloAndroidAgde)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloAndroidAgde.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroidAgde" + }, + "Sample (HelloClangCl)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloClangCl.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloClangCl" + }, + "Sample (HelloEvents)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloEvents.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloEvents" + }, + "Sample (HelloLinux)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloLinux.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloLinux" + }, + "Sample (HelloRust)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloRust.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloRust" + }, + "Sample (HelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloWorld" + }, + "Sample (HelloXCode)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloXCode.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloXCode" + }, + "Sample (NetCore/DotNetCoreFrameworkHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetCoreFrameworkHelloWorld" + }, + "Sample (NetCore/DotNetFrameworkHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetFrameworkHelloWorld" + }, + "Sample (NetCore/DotNetMultiFrameworksHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetMultiFrameworksHelloWorld" + }, + "Sample (NetCore/DotNetOSMultiFrameworksHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetOSMultiFrameworksHelloWorld" + }, + "Sample (PackageReferences)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'PackageReferences.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\PackageReferences" + }, + "Sample (QTFileCustomBuild)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'QTFileCustomBuild.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\QTFileCustomBuild" + }, + "Sample (SimpleExeLibDependency)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'SimpleExeLibDependency.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\SimpleExeLibDependency" + }, + "Sample (vcpkg)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\vcpkg\\sharpmake" + }, + "FunctionalTest (FastBuildFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('FastBuildFunctionalTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\FastBuildFunctionalTest" + }, + "FunctionalTest (NoAllFastBuildProjectFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('NoAllFastBuildProjectFunctionalTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\NoAllFastBuildProjectFunctionalTest" + }, + "FunctionalTest (OnlyNeededFastBuildTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('OnlyNeededFastBuildTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\OnlyNeededFastBuildTest" + }, + "FunctionalTest (SharpmakePackageFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('SharpmakePackageFunctionalTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\SharpmakePackageFunctionalTest" + }, + "FunctionalTest (functional_test.py)": { + "commandName": "Executable", + "executablePath": "python", + "commandLineArgs": "$(ProjectDir)\\..\\functional_test.py" + }, + "FunctionalTest (regression_test.py)": { + "commandName": "Executable", + "executablePath": "python", + "commandLineArgs": "$(ProjectDir)\\..\\regression_test.py" } -} + } +} \ No newline at end of file diff --git a/Sharpmake.Application/Sharpmake.Application.csproj b/Sharpmake.Application/Sharpmake.Application.csproj index 197c981ee..93bacf441 100644 --- a/Sharpmake.Application/Sharpmake.Application.csproj +++ b/Sharpmake.Application/Sharpmake.Application.csproj @@ -35,5 +35,13 @@ True + + full + + + + full + + diff --git a/Sharpmake/Project.Configuration.cs b/Sharpmake/Project.Configuration.cs index d98047456..355e3e799 100644 --- a/Sharpmake/Project.Configuration.cs +++ b/Sharpmake/Project.Configuration.cs @@ -2479,11 +2479,13 @@ public bool DefaultAddFastBuildProjectToSolution() private Dictionary, DependencySetting> _dependenciesSetting = new Dictionary, DependencySetting>(); // These dependencies will not be propagated to other projects that depend on us - internal IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); + //internal IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); // hbkim + public IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); // These dependencies will be propagated to other dependent projects, but not across dll dependencies. internal IDictionary UnResolvedProtectedDependencies { get; } = new Dictionary(); // These dependencies are always propagated to other dependent projects. - internal Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); + //internal Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); // hbkim + public Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); private Strings _resolvedTargetCopyFiles = new Strings(); diff --git a/Sharpmake/Project.cs b/Sharpmake/Project.cs index 240fd9202..878a6cedb 100644 --- a/Sharpmake/Project.cs +++ b/Sharpmake/Project.cs @@ -102,8 +102,8 @@ public string GuidReferencePath public Strings PreFilterSourceFiles { get { return _preFilterSourceFiles; } } - public Strings SourceFilesExtensions = new Strings(".cpp", ".c", ".cc", ".h", ".inl", ".hpp", ".hh", ".asm");// All files under SourceRootPath are evaluated, if match found, it will be added to SourceFiles - public Strings SourceFilesCompileExtensions = new Strings(".cpp", ".cc", ".c", ".asm"); // File that match this regex compile + public Strings SourceFilesExtensions = new Strings(".cpp", ".c", ".cc", ".h", ".inl", ".hpp", ".hh", ".asm", ".ixx");// All files under SourceRootPath are evaluated, if match found, it will be added to SourceFiles + public Strings SourceFilesCompileExtensions = new Strings(".cpp", ".cc", ".c", ".asm", ".ixx"); // File that match this regex compile public Strings SourceFilesCPPExtensions = new Strings(".cpp", ".cc"); public Strings SourceFilesFilters = null; // if != null, include only file in this filter diff --git a/Sharpmake/Target.cs b/Sharpmake/Target.cs index 500e922a2..a5653b0d0 100644 --- a/Sharpmake/Target.cs +++ b/Sharpmake/Target.cs @@ -7,6 +7,8 @@ using System.Diagnostics; using System.Linq; using System.Reflection; +using static Sharpmake.EngineTarget; +using static Sharpmake.Target; namespace Sharpmake { @@ -248,6 +250,7 @@ public enum KitsRootEnum KitsRoot10 } + // Default Target, user may define its own if needed public class Target : ITarget { @@ -287,6 +290,34 @@ public Target( } } + [Fragment, Flags] + public enum ELaunchType + { + Editor = 1 << 0, + Client = 1 << 1, + Server = 1 << 2 + } + + public class EngineTarget : Target + { + public ELaunchType LaunchType; + + public EngineTarget() { } + public EngineTarget( + ELaunchType launchType, + Platform platform, + DevEnv devEnv, + Optimization optimization, + OutputType outputType = OutputType.Lib, + Blob blob = Blob.NoBlob, + BuildSystem buildSystem = BuildSystem.MSBuild, + DotNetFramework framework = DotNetFramework.v3_5) + : base(platform, devEnv, optimization, outputType, blob, buildSystem, framework) + { + LaunchType = launchType; //ELaunchType.Editor | ELaunchType.Client | ELaunchType.Server; + } + } + public abstract class ITarget : IComparable { public override string ToString() From 4def5eae6692f3834ca225259336295180222544 Mon Sep 17 00:00:00 2001 From: DESKTOP-C3TDPII Date: Wed, 1 Nov 2023 22:13:35 +0900 Subject: [PATCH 4/5] - remove --- .../Properties/launchSettings.json | 317 +++++++++--------- .../Sharpmake.Application.csproj | 8 + Sharpmake/Project.Configuration.cs | 6 +- Sharpmake/Project.cs | 4 +- Sharpmake/Target.cs | 31 ++ 5 files changed, 200 insertions(+), 166 deletions(-) diff --git a/Sharpmake.Application/Properties/launchSettings.json b/Sharpmake.Application/Properties/launchSettings.json index 463c0e209..4d15c9d58 100644 --- a/Sharpmake.Application/Properties/launchSettings.json +++ b/Sharpmake.Application/Properties/launchSettings.json @@ -1,164 +1,157 @@ { - "profiles": { - // Samples - "Sample (CompileCommandDatabase)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CompileCommandDatabase.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CompileCommandDatabase" - }, - "Sample (ConfigureOrder)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\ConfigureOrder" - }, - "Sample (CPPCLI)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CLRTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CPPCLI" - }, - "Sample (CSharpHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpHelloWorld" - }, - "Sample (CSharpImports)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CSharpImports.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpImports" - }, - "Sample (CSharpVsix)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CSharpVsix.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpVsix" - }, - "Sample (CSharpWCF)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CSharpWCF.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpWCF" - }, - "Sample (CustomBuildStep)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027CustomBuildStep.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CustomBuildStep" - }, - "Sample (FastBuildSimpleExecutable)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027FastBuildSimpleExecutable.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\FastBuildSimpleExecutable" - }, - "Sample (HelloAndroid)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloAndroid.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroid" - }, - "Sample (HelloAndroidAgde)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloAndroidAgde.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroidAgde" - }, - "Sample (HelloClangCl)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloClangCl.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloClangCl" - }, - "Sample (HelloEvents)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloEvents.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloEvents" - }, - "Sample (HelloLinux)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloLinux.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloLinux" - }, - "Sample (HelloRust)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloRust.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloRust" - }, - "Sample (HelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloWorld" - }, - "Sample (HelloXCode)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloXCode.Main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloXCode" - }, - "Sample (NetCore/DotNetCoreFrameworkHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetCoreFrameworkHelloWorld" - }, - "Sample (NetCore/DotNetFrameworkHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetFrameworkHelloWorld" - }, - "Sample (NetCore/DotNetMultiFrameworksHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetMultiFrameworksHelloWorld" - }, - "Sample (NetCore/DotNetOSMultiFrameworksHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetOSMultiFrameworksHelloWorld" - }, - "Sample (PackageReferences)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027PackageReferences.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\PackageReferences" - }, - "Sample (QTFileCustomBuild)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027QTFileCustomBuild.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\QTFileCustomBuild" - }, - "Sample (SimpleExeLibDependency)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027SimpleExeLibDependency.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\SimpleExeLibDependency" - }, - "Sample (vcpkg)": { - "commandName": "Project", - "commandLineArgs": "/sources(@\u0027main.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\samples\\vcpkg\\sharpmake" - }, - - // FunctionalTest - "FunctionalTest (FastBuildFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027FastBuildFunctionalTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\FastBuildFunctionalTest" - }, - "FunctionalTest (NoAllFastBuildProjectFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027NoAllFastBuildProjectFunctionalTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\NoAllFastBuildProjectFunctionalTest" - }, - "FunctionalTest (OnlyNeededFastBuildTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027OnlyNeededFastBuildTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\OnlyNeededFastBuildTest" - }, - "FunctionalTest (SharpmakePackageFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources(\u0027SharpmakePackageFunctionalTest.sharpmake.cs\u0027)", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\SharpmakePackageFunctionalTest" - }, - - // Python scripts - "FunctionalTest (functional_test.py)": { - "commandName": "Executable", - "executablePath": "python", - "commandLineArgs": "$(ProjectDir)\\..\\functional_test.py" - }, - "FunctionalTest (regression_test.py)": { - "commandName": "Executable", - "executablePath": "python", - "commandLineArgs": "$(ProjectDir)\\..\\regression_test.py" - } + "profiles": { + "Sample (CompileCommandDatabase)": { + "commandName": "Project" + }, + "Sample (ConfigureOrder)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\ConfigureOrder" + }, + "Sample (CPPCLI)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CLRTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CPPCLI" + }, + "Sample (CSharpHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpHelloWorld" + }, + "Sample (CSharpImports)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CSharpImports.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpImports" + }, + "Sample (CSharpVsix)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CSharpVsix.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpVsix" + }, + "Sample (CSharpWCF)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CSharpWCF.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpWCF" + }, + "Sample (CustomBuildStep)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'CustomBuildStep.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CustomBuildStep" + }, + "Sample (FastBuildSimpleExecutable)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'FastBuildSimpleExecutable.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\FastBuildSimpleExecutable" + }, + "Sample (HelloAndroid)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloAndroid.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroid" + }, + "Sample (HelloAndroidAgde)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloAndroidAgde.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroidAgde" + }, + "Sample (HelloClangCl)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloClangCl.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloClangCl" + }, + "Sample (HelloEvents)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloEvents.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloEvents" + }, + "Sample (HelloLinux)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloLinux.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloLinux" + }, + "Sample (HelloRust)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloRust.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloRust" + }, + "Sample (HelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloWorld" + }, + "Sample (HelloXCode)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloXCode.Main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloXCode" + }, + "Sample (NetCore/DotNetCoreFrameworkHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetCoreFrameworkHelloWorld" + }, + "Sample (NetCore/DotNetFrameworkHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetFrameworkHelloWorld" + }, + "Sample (NetCore/DotNetMultiFrameworksHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetMultiFrameworksHelloWorld" + }, + "Sample (NetCore/DotNetOSMultiFrameworksHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetOSMultiFrameworksHelloWorld" + }, + "Sample (PackageReferences)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'PackageReferences.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\PackageReferences" + }, + "Sample (QTFileCustomBuild)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'QTFileCustomBuild.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\QTFileCustomBuild" + }, + "Sample (SimpleExeLibDependency)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'SimpleExeLibDependency.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\SimpleExeLibDependency" + }, + "Sample (vcpkg)": { + "commandName": "Project", + "commandLineArgs": "/sources(@'main.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\samples\\vcpkg\\sharpmake" + }, + "FunctionalTest (FastBuildFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('FastBuildFunctionalTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\FastBuildFunctionalTest" + }, + "FunctionalTest (NoAllFastBuildProjectFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('NoAllFastBuildProjectFunctionalTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\NoAllFastBuildProjectFunctionalTest" + }, + "FunctionalTest (OnlyNeededFastBuildTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('OnlyNeededFastBuildTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\OnlyNeededFastBuildTest" + }, + "FunctionalTest (SharpmakePackageFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources('SharpmakePackageFunctionalTest.sharpmake.cs')", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\SharpmakePackageFunctionalTest" + }, + "FunctionalTest (functional_test.py)": { + "commandName": "Executable", + "executablePath": "python", + "commandLineArgs": "$(ProjectDir)\\..\\functional_test.py" + }, + "FunctionalTest (regression_test.py)": { + "commandName": "Executable", + "executablePath": "python", + "commandLineArgs": "$(ProjectDir)\\..\\regression_test.py" } -} + } +} \ No newline at end of file diff --git a/Sharpmake.Application/Sharpmake.Application.csproj b/Sharpmake.Application/Sharpmake.Application.csproj index 197c981ee..93bacf441 100644 --- a/Sharpmake.Application/Sharpmake.Application.csproj +++ b/Sharpmake.Application/Sharpmake.Application.csproj @@ -35,5 +35,13 @@ True + + full + + + + full + + diff --git a/Sharpmake/Project.Configuration.cs b/Sharpmake/Project.Configuration.cs index d98047456..355e3e799 100644 --- a/Sharpmake/Project.Configuration.cs +++ b/Sharpmake/Project.Configuration.cs @@ -2479,11 +2479,13 @@ public bool DefaultAddFastBuildProjectToSolution() private Dictionary, DependencySetting> _dependenciesSetting = new Dictionary, DependencySetting>(); // These dependencies will not be propagated to other projects that depend on us - internal IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); + //internal IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); // hbkim + public IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); // These dependencies will be propagated to other dependent projects, but not across dll dependencies. internal IDictionary UnResolvedProtectedDependencies { get; } = new Dictionary(); // These dependencies are always propagated to other dependent projects. - internal Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); + //internal Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); // hbkim + public Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); private Strings _resolvedTargetCopyFiles = new Strings(); diff --git a/Sharpmake/Project.cs b/Sharpmake/Project.cs index 240fd9202..878a6cedb 100644 --- a/Sharpmake/Project.cs +++ b/Sharpmake/Project.cs @@ -102,8 +102,8 @@ public string GuidReferencePath public Strings PreFilterSourceFiles { get { return _preFilterSourceFiles; } } - public Strings SourceFilesExtensions = new Strings(".cpp", ".c", ".cc", ".h", ".inl", ".hpp", ".hh", ".asm");// All files under SourceRootPath are evaluated, if match found, it will be added to SourceFiles - public Strings SourceFilesCompileExtensions = new Strings(".cpp", ".cc", ".c", ".asm"); // File that match this regex compile + public Strings SourceFilesExtensions = new Strings(".cpp", ".c", ".cc", ".h", ".inl", ".hpp", ".hh", ".asm", ".ixx");// All files under SourceRootPath are evaluated, if match found, it will be added to SourceFiles + public Strings SourceFilesCompileExtensions = new Strings(".cpp", ".cc", ".c", ".asm", ".ixx"); // File that match this regex compile public Strings SourceFilesCPPExtensions = new Strings(".cpp", ".cc"); public Strings SourceFilesFilters = null; // if != null, include only file in this filter diff --git a/Sharpmake/Target.cs b/Sharpmake/Target.cs index 500e922a2..a5653b0d0 100644 --- a/Sharpmake/Target.cs +++ b/Sharpmake/Target.cs @@ -7,6 +7,8 @@ using System.Diagnostics; using System.Linq; using System.Reflection; +using static Sharpmake.EngineTarget; +using static Sharpmake.Target; namespace Sharpmake { @@ -248,6 +250,7 @@ public enum KitsRootEnum KitsRoot10 } + // Default Target, user may define its own if needed public class Target : ITarget { @@ -287,6 +290,34 @@ public Target( } } + [Fragment, Flags] + public enum ELaunchType + { + Editor = 1 << 0, + Client = 1 << 1, + Server = 1 << 2 + } + + public class EngineTarget : Target + { + public ELaunchType LaunchType; + + public EngineTarget() { } + public EngineTarget( + ELaunchType launchType, + Platform platform, + DevEnv devEnv, + Optimization optimization, + OutputType outputType = OutputType.Lib, + Blob blob = Blob.NoBlob, + BuildSystem buildSystem = BuildSystem.MSBuild, + DotNetFramework framework = DotNetFramework.v3_5) + : base(platform, devEnv, optimization, outputType, blob, buildSystem, framework) + { + LaunchType = launchType; //ELaunchType.Editor | ELaunchType.Client | ELaunchType.Server; + } + } + public abstract class ITarget : IComparable { public override string ToString() From d36017d49b61f0b78b7d07f90375b24cb852da6b Mon Sep 17 00:00:00 2001 From: DESKTOP-C3TDPII Date: Wed, 1 Nov 2023 22:19:26 +0900 Subject: [PATCH 5/5] - reset --- .../Properties/launchSettings.json | 317 +++++++++--------- .../Sharpmake.Application.csproj | 8 - Sharpmake/Project.Configuration.cs | 6 +- Sharpmake/Project.cs | 4 +- Sharpmake/Target.cs | 31 -- 5 files changed, 166 insertions(+), 200 deletions(-) diff --git a/Sharpmake.Application/Properties/launchSettings.json b/Sharpmake.Application/Properties/launchSettings.json index 4d15c9d58..463c0e209 100644 --- a/Sharpmake.Application/Properties/launchSettings.json +++ b/Sharpmake.Application/Properties/launchSettings.json @@ -1,157 +1,164 @@ { - "profiles": { - "Sample (CompileCommandDatabase)": { - "commandName": "Project" - }, - "Sample (ConfigureOrder)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\ConfigureOrder" - }, - "Sample (CPPCLI)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'CLRTest.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CPPCLI" - }, - "Sample (CSharpHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpHelloWorld" - }, - "Sample (CSharpImports)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'CSharpImports.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpImports" - }, - "Sample (CSharpVsix)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'CSharpVsix.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpVsix" - }, - "Sample (CSharpWCF)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'CSharpWCF.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpWCF" - }, - "Sample (CustomBuildStep)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'CustomBuildStep.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\CustomBuildStep" - }, - "Sample (FastBuildSimpleExecutable)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'FastBuildSimpleExecutable.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\FastBuildSimpleExecutable" - }, - "Sample (HelloAndroid)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloAndroid.Main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroid" - }, - "Sample (HelloAndroidAgde)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloAndroidAgde.Main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroidAgde" - }, - "Sample (HelloClangCl)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloClangCl.Main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloClangCl" - }, - "Sample (HelloEvents)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloEvents.Main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloEvents" - }, - "Sample (HelloLinux)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloLinux.Main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloLinux" - }, - "Sample (HelloRust)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloRust.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloRust" - }, - "Sample (HelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloWorld" - }, - "Sample (HelloXCode)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloXCode.Main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloXCode" - }, - "Sample (NetCore/DotNetCoreFrameworkHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetCoreFrameworkHelloWorld" - }, - "Sample (NetCore/DotNetFrameworkHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetFrameworkHelloWorld" - }, - "Sample (NetCore/DotNetMultiFrameworksHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetMultiFrameworksHelloWorld" - }, - "Sample (NetCore/DotNetOSMultiFrameworksHelloWorld)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'HelloWorld.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetOSMultiFrameworksHelloWorld" - }, - "Sample (PackageReferences)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'PackageReferences.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\PackageReferences" - }, - "Sample (QTFileCustomBuild)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'QTFileCustomBuild.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\QTFileCustomBuild" - }, - "Sample (SimpleExeLibDependency)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'SimpleExeLibDependency.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\SimpleExeLibDependency" - }, - "Sample (vcpkg)": { - "commandName": "Project", - "commandLineArgs": "/sources(@'main.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\samples\\vcpkg\\sharpmake" - }, - "FunctionalTest (FastBuildFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources('FastBuildFunctionalTest.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\FastBuildFunctionalTest" - }, - "FunctionalTest (NoAllFastBuildProjectFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources('NoAllFastBuildProjectFunctionalTest.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\NoAllFastBuildProjectFunctionalTest" - }, - "FunctionalTest (OnlyNeededFastBuildTest)": { - "commandName": "Project", - "commandLineArgs": "/sources('OnlyNeededFastBuildTest.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\OnlyNeededFastBuildTest" - }, - "FunctionalTest (SharpmakePackageFunctionalTest)": { - "commandName": "Project", - "commandLineArgs": "/sources('SharpmakePackageFunctionalTest.sharpmake.cs')", - "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\SharpmakePackageFunctionalTest" - }, - "FunctionalTest (functional_test.py)": { - "commandName": "Executable", - "executablePath": "python", - "commandLineArgs": "$(ProjectDir)\\..\\functional_test.py" - }, - "FunctionalTest (regression_test.py)": { - "commandName": "Executable", - "executablePath": "python", - "commandLineArgs": "$(ProjectDir)\\..\\regression_test.py" + "profiles": { + // Samples + "Sample (CompileCommandDatabase)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027CompileCommandDatabase.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CompileCommandDatabase" + }, + "Sample (ConfigureOrder)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\ConfigureOrder" + }, + "Sample (CPPCLI)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027CLRTest.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CPPCLI" + }, + "Sample (CSharpHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpHelloWorld" + }, + "Sample (CSharpImports)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027CSharpImports.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpImports" + }, + "Sample (CSharpVsix)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027CSharpVsix.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpVsix" + }, + "Sample (CSharpWCF)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027CSharpWCF.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CSharpWCF" + }, + "Sample (CustomBuildStep)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027CustomBuildStep.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\CustomBuildStep" + }, + "Sample (FastBuildSimpleExecutable)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027FastBuildSimpleExecutable.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\FastBuildSimpleExecutable" + }, + "Sample (HelloAndroid)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloAndroid.Main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroid" + }, + "Sample (HelloAndroidAgde)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloAndroidAgde.Main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloAndroidAgde" + }, + "Sample (HelloClangCl)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloClangCl.Main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloClangCl" + }, + "Sample (HelloEvents)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloEvents.Main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloEvents" + }, + "Sample (HelloLinux)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloLinux.Main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloLinux" + }, + "Sample (HelloRust)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloRust.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloRust" + }, + "Sample (HelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloWorld" + }, + "Sample (HelloXCode)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloXCode.Main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\HelloXCode" + }, + "Sample (NetCore/DotNetCoreFrameworkHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetCoreFrameworkHelloWorld" + }, + "Sample (NetCore/DotNetFrameworkHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetFrameworkHelloWorld" + }, + "Sample (NetCore/DotNetMultiFrameworksHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetMultiFrameworksHelloWorld" + }, + "Sample (NetCore/DotNetOSMultiFrameworksHelloWorld)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027HelloWorld.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\NetCore\\DotNetOSMultiFrameworksHelloWorld" + }, + "Sample (PackageReferences)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027PackageReferences.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\PackageReferences" + }, + "Sample (QTFileCustomBuild)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027QTFileCustomBuild.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\QTFileCustomBuild" + }, + "Sample (SimpleExeLibDependency)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027SimpleExeLibDependency.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\SimpleExeLibDependency" + }, + "Sample (vcpkg)": { + "commandName": "Project", + "commandLineArgs": "/sources(@\u0027main.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\samples\\vcpkg\\sharpmake" + }, + + // FunctionalTest + "FunctionalTest (FastBuildFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources(\u0027FastBuildFunctionalTest.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\FastBuildFunctionalTest" + }, + "FunctionalTest (NoAllFastBuildProjectFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources(\u0027NoAllFastBuildProjectFunctionalTest.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\NoAllFastBuildProjectFunctionalTest" + }, + "FunctionalTest (OnlyNeededFastBuildTest)": { + "commandName": "Project", + "commandLineArgs": "/sources(\u0027OnlyNeededFastBuildTest.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\OnlyNeededFastBuildTest" + }, + "FunctionalTest (SharpmakePackageFunctionalTest)": { + "commandName": "Project", + "commandLineArgs": "/sources(\u0027SharpmakePackageFunctionalTest.sharpmake.cs\u0027)", + "workingDirectory": "$(ProjectDir)\\..\\Sharpmake.FunctionalTests\\SharpmakePackageFunctionalTest" + }, + + // Python scripts + "FunctionalTest (functional_test.py)": { + "commandName": "Executable", + "executablePath": "python", + "commandLineArgs": "$(ProjectDir)\\..\\functional_test.py" + }, + "FunctionalTest (regression_test.py)": { + "commandName": "Executable", + "executablePath": "python", + "commandLineArgs": "$(ProjectDir)\\..\\regression_test.py" + } } - } -} \ No newline at end of file +} diff --git a/Sharpmake.Application/Sharpmake.Application.csproj b/Sharpmake.Application/Sharpmake.Application.csproj index 93bacf441..197c981ee 100644 --- a/Sharpmake.Application/Sharpmake.Application.csproj +++ b/Sharpmake.Application/Sharpmake.Application.csproj @@ -35,13 +35,5 @@ True - - full - - - - full - - diff --git a/Sharpmake/Project.Configuration.cs b/Sharpmake/Project.Configuration.cs index 355e3e799..d98047456 100644 --- a/Sharpmake/Project.Configuration.cs +++ b/Sharpmake/Project.Configuration.cs @@ -2479,13 +2479,11 @@ public bool DefaultAddFastBuildProjectToSolution() private Dictionary, DependencySetting> _dependenciesSetting = new Dictionary, DependencySetting>(); // These dependencies will not be propagated to other projects that depend on us - //internal IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); // hbkim - public IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); + internal IDictionary UnResolvedPrivateDependencies { get; } = new Dictionary(); // These dependencies will be propagated to other dependent projects, but not across dll dependencies. internal IDictionary UnResolvedProtectedDependencies { get; } = new Dictionary(); // These dependencies are always propagated to other dependent projects. - //internal Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); // hbkim - public Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); + internal Dictionary UnResolvedPublicDependencies { get; } = new Dictionary(); private Strings _resolvedTargetCopyFiles = new Strings(); diff --git a/Sharpmake/Project.cs b/Sharpmake/Project.cs index 878a6cedb..240fd9202 100644 --- a/Sharpmake/Project.cs +++ b/Sharpmake/Project.cs @@ -102,8 +102,8 @@ public string GuidReferencePath public Strings PreFilterSourceFiles { get { return _preFilterSourceFiles; } } - public Strings SourceFilesExtensions = new Strings(".cpp", ".c", ".cc", ".h", ".inl", ".hpp", ".hh", ".asm", ".ixx");// All files under SourceRootPath are evaluated, if match found, it will be added to SourceFiles - public Strings SourceFilesCompileExtensions = new Strings(".cpp", ".cc", ".c", ".asm", ".ixx"); // File that match this regex compile + public Strings SourceFilesExtensions = new Strings(".cpp", ".c", ".cc", ".h", ".inl", ".hpp", ".hh", ".asm");// All files under SourceRootPath are evaluated, if match found, it will be added to SourceFiles + public Strings SourceFilesCompileExtensions = new Strings(".cpp", ".cc", ".c", ".asm"); // File that match this regex compile public Strings SourceFilesCPPExtensions = new Strings(".cpp", ".cc"); public Strings SourceFilesFilters = null; // if != null, include only file in this filter diff --git a/Sharpmake/Target.cs b/Sharpmake/Target.cs index a5653b0d0..500e922a2 100644 --- a/Sharpmake/Target.cs +++ b/Sharpmake/Target.cs @@ -7,8 +7,6 @@ using System.Diagnostics; using System.Linq; using System.Reflection; -using static Sharpmake.EngineTarget; -using static Sharpmake.Target; namespace Sharpmake { @@ -250,7 +248,6 @@ public enum KitsRootEnum KitsRoot10 } - // Default Target, user may define its own if needed public class Target : ITarget { @@ -290,34 +287,6 @@ public Target( } } - [Fragment, Flags] - public enum ELaunchType - { - Editor = 1 << 0, - Client = 1 << 1, - Server = 1 << 2 - } - - public class EngineTarget : Target - { - public ELaunchType LaunchType; - - public EngineTarget() { } - public EngineTarget( - ELaunchType launchType, - Platform platform, - DevEnv devEnv, - Optimization optimization, - OutputType outputType = OutputType.Lib, - Blob blob = Blob.NoBlob, - BuildSystem buildSystem = BuildSystem.MSBuild, - DotNetFramework framework = DotNetFramework.v3_5) - : base(platform, devEnv, optimization, outputType, blob, buildSystem, framework) - { - LaunchType = launchType; //ELaunchType.Editor | ELaunchType.Client | ELaunchType.Server; - } - } - public abstract class ITarget : IComparable { public override string ToString()