зеркало из https://github.com/microsoft/BuildXL.git
Add MsBuildResolver and CMakeResolver examples (#340)
This commit is contained in:
Родитель
d14dec5843
Коммит
b2930760dd
|
@ -14,6 +14,9 @@
|
|||
/examples/Python/Out/
|
||||
/examples/Python/script_out/
|
||||
/examples/HybridBuild/Out/
|
||||
/examples/CMakeHelloWorld/Out/
|
||||
/examples/MsBuildHelloWorld/Out/
|
||||
/examples/MsBuildHelloWorld/Debug/
|
||||
bin/
|
||||
obj/
|
||||
contentcache/
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
cmake_minimum_required (VERSION 2.6)
|
||||
project (Example)
|
||||
add_executable(Example main.cc)
|
|
@ -0,0 +1,7 @@
|
|||
# Instructions
|
||||
|
||||
1. Setup BuildXL as explained in the documentation
|
||||
2. Point the environment variable BUILDXL_BIN to the BuildXL binary folder path. For example, if you set up BuildXL in D:\BuildXL, then D:\BuildXL\Out\Bin\debug\net472 should be the value.
|
||||
3. Run .\run.ps1 from PowerShell, or equivalently run.bat from the command line prompt
|
||||
|
||||
The build outputs will be located in Out/Example. For further configuration options, see: https://github.com/microsoft/BuildXL/blob/master/Public/Sdk/Public/Prelude/Prelude.Configuration.Resolvers.dsc#L285
|
|
@ -0,0 +1 @@
|
|||
%BUILDXL_BIN%/bxl /c:config.bc /disableProcessRetryOnResourceExhaustion+
|
|
@ -0,0 +1 @@
|
|||
& $Env:BUILDXL_BIN/bxl /c:config.bc /disableProcessRetryOnResourceExhaustion+
|
|
@ -0,0 +1,10 @@
|
|||
config({
|
||||
resolvers: [
|
||||
{
|
||||
kind: "CMake",
|
||||
projectRoot: d`.`,
|
||||
moduleName: "Project",
|
||||
buildDirectory: r`Example`,
|
||||
}
|
||||
]
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
#include <iostream>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
std::cout << "Hello World!" << std::endl;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.default.props" />
|
||||
<PropertyGroup>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Targets" />
|
||||
</Project>
|
|
@ -0,0 +1,7 @@
|
|||
# Instructions
|
||||
|
||||
1. Setup BuildXL as explained in the documentation
|
||||
2. Point the environment variable BUILDXL_BIN to the BuildXL binary folder path. For example, if you set up BuildXL in D:\BuildXL, then D:\BuildXL\Out\Bin\debug\net472 should be the value.
|
||||
3. Run .\run.ps1 from PowerShell, or equivalently run.bat from the command line prompt
|
||||
|
||||
The build outputs will be located in the Debug folder. For further configuration options, see: https://github.com/microsoft/BuildXL/blob/master/Public/Sdk/Public/Prelude/Prelude.Configuration.Resolvers.dsc#L98
|
|
@ -0,0 +1 @@
|
|||
%BUILDXL_BIN%/bxl /c:config.bc /disableProcessRetryOnResourceExhaustion+
|
|
@ -0,0 +1 @@
|
|||
& $Env:BUILDXL_BIN/bxl /c:config.bc /disableProcessRetryOnResourceExhaustion+
|
|
@ -0,0 +1,9 @@
|
|||
config({
|
||||
resolvers: [
|
||||
{
|
||||
kind: "MsBuild",
|
||||
root: d`.`,
|
||||
moduleName: "Project",
|
||||
}
|
||||
]
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
#include <iostream>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
std::cout << "Hello World!" << std::endl;
|
||||
}
|
Загрузка…
Ссылка в новой задаче