Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
317 changes: 155 additions & 162 deletions Sharpmake.Application/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,164 +1,157 @@
{
"profiles": {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this file.

// 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"
}
}
}
}
8 changes: 8 additions & 0 deletions Sharpmake.Application/Sharpmake.Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,13 @@
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert these

<DebugType>full</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>full</DebugType>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
10 changes: 10 additions & 0 deletions Sharpmake.Generators/VisualStudio/ProjectOptionsGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ public abstract partial class BasePlatform
<WindowsTargetPlatformVersion>[options.WindowsTargetPlatformVersion]</WindowsTargetPlatformVersion>
<SpectreMitigation>[options.SpectreMitigation]</SpectreMitigation>
<EnableASAN>[options.EnableASAN]</EnableASAN>
<EnableUnitySupport>[options.JumboBuild]</EnableUnitySupport>
<MaxFilesInUnityFile>[options.MaxFilesPerUnityFile]</MaxFilesInUnityFile>
</PropertyGroup>
";

Expand Down
14 changes: 14 additions & 0 deletions Sharpmake/Options.Vc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,20 @@ public enum EnableAsan
[DevEnvVersion(minimum = DevEnv.vs2019)]
Enable
}

/// <summary>
/// Enable Jumbo/Unity builds
/// </summary>
/// <remarks>
/// Merges multiple translation units together
/// </remarks>
public enum JumboBuild
{
[Default]
Disable,
[DevEnvVersion(minimum = DevEnv.vs2019)]
Enable
}
}

public static class CodeAnalysis
Expand Down
Loading