111 lines
3.9 KiB
Text
111 lines
3.9 KiB
Text
// FBuildTest
|
|
//------------------------------------------------------------------------------
|
|
{
|
|
.ProjectName = 'FBuildTest'
|
|
.ProjectPath = 'Tools\FBuild\FBuildTest'
|
|
|
|
// Visual Studio Project Generation
|
|
//--------------------------------------------------------------------------
|
|
VCXProject( '$ProjectName$-proj' )
|
|
{
|
|
.ProjectOutput = '$ProjectPath$\$ProjectName$.vcxproj'
|
|
.ProjectInputPaths = '$ProjectPath$\'
|
|
.ProjectBasePath = '$ProjectPath$\'
|
|
|
|
.LocalDebuggerCommand = '^$(SolutionDir)..\..\..\tmp\^$(Configuration)\Tools\FBuild\FBuildTest\FBuildTest.exe'
|
|
}
|
|
|
|
// Unity
|
|
//--------------------------------------------------------------------------
|
|
Unity( '$ProjectName$-UnityGenerate' )
|
|
{
|
|
.UnityInputPath = '$ProjectPath$\'
|
|
.UnityOutputPath = '$OutputBase$\Unity\$ProjectPath$\'
|
|
|
|
// Ignore test data (some of which is code)
|
|
.UnityInputExcludePath = 'Tools\FBuild\FBuildTest\Data\'
|
|
}
|
|
|
|
// Windows (MSVC)
|
|
//--------------------------------------------------------------------------
|
|
// Lib
|
|
ForEach( .Config in .Configs_Windows_MSVC )
|
|
{
|
|
Using( .Config )
|
|
.OutputBase + '\$Platform$-$Config$'
|
|
|
|
// Static Library
|
|
Library( '$ProjectName$-Lib-$Platform$-$Config$' )
|
|
{
|
|
// Input (Unity)
|
|
.CompilerInputUnity = '$ProjectName$-UnityGenerate'
|
|
|
|
// Output
|
|
.CompilerOutputPath = '$OutputBase$\$ProjectName$\'
|
|
.LibrarianOutput = '$OutputBase$\$ProjectName$\$ProjectName$.lib'
|
|
}
|
|
|
|
// Executable
|
|
Executable( '$ProjectName$-Exe-$Platform$-$Config$' )
|
|
{
|
|
.Libraries = { 'Core-Lib-$Platform$-$Config$',
|
|
'FBuildCore-Lib-$Platform$-$Config$',
|
|
'FBuildTest-Lib-$Platform$-$Config$',
|
|
'TestFrameWork-Lib-$Platform$-$Config$',
|
|
'LZ4-Lib-$Platform$-$Config$' }
|
|
.LinkerOutput = '$OutputBase$\Tools\FBuild\FBuildTest\FBuildTest.exe'
|
|
.LinkerOptions + ' /SUBSYSTEM:CONSOLE'
|
|
+ ' kernel32.lib'
|
|
+ ' Ws2_32.lib'
|
|
+ ' LIBCMT.LIB'
|
|
+ ' User32.lib'
|
|
}
|
|
Alias( '$ProjectName$-$Platform$-$Config$' ) { .Targets = '$ProjectName$-Exe-$Platform$-$Config$' }
|
|
|
|
// Run Test
|
|
Test( '$ProjectName$-RunTest-$Platform$-$Config$' )
|
|
{
|
|
.TestExecutable = '$ProjectName$-Exe-$Platform$-$Config$'
|
|
.TestOutput = '$OutputBase$\$ProjectPath$\TestOutput.txt'
|
|
.TestWorkingDir = 'Tools\FBuild\FBuildTest'
|
|
}
|
|
}
|
|
|
|
// Windows (Clang)
|
|
//--------------------------------------------------------------------------
|
|
ForEach( .Config in .Configs_Windows_Clang )
|
|
{
|
|
Using( .Config )
|
|
.OutputBase + '\$Platform$-$Config$'
|
|
|
|
// Static Library
|
|
Library( '$ProjectName$-Lib-$Platform$-$Config$' )
|
|
{
|
|
// Input (Unity)
|
|
.CompilerInputUnity = '$ProjectName$-UnityGenerate'
|
|
|
|
// Output
|
|
.CompilerOutputPath = '$OutputBase$\$ProjectName$\'
|
|
.LibrarianOutput = '$OutputBase$\$ProjectName$\$ProjectName$.lib'
|
|
}
|
|
Alias( '$ProjectName$-$Platform$-$Config$' ) { .Targets = '$ProjectName$-Lib-$Platform$-$Config$' }
|
|
}
|
|
|
|
// Aliases
|
|
//--------------------------------------------------------------------------
|
|
// Per-Config
|
|
Alias( '$ProjectName$-Debug' ) { .Targets = { '$ProjectName$-X86-Debug', '$ProjectName$-X64-Debug', '$ProjectName$-X86Clang-Debug' } }
|
|
Alias( '$ProjectName$-Profile' ) { .Targets = { '$ProjectName$-X86-Profile', '$ProjectName$-X64-Profile' } }
|
|
Alias( '$ProjectName$-Release' ) { .Targets = { '$ProjectName$-X86-Release', '$ProjectName$-X64-Release' } }
|
|
|
|
// Per-Platform
|
|
Alias( '$ProjectName$-X86' ) { .Targets = { '$ProjectName$-X86-Debug', '$ProjectName$-X64-Release', '$ProjectName$-X86-Profile' } }
|
|
Alias( '$ProjectName$-X64' ) { .Targets = { '$ProjectName$-X64-Debug', '$ProjectName$-X64-Release', '$ProjectName$-X64-Profile' } }
|
|
Alias( '$ProjectName$-X86Clang' ) { .Targets = { '$ProjectName$-X86Clang-Debug' } }
|
|
|
|
// All
|
|
Alias( '$ProjectName$' )
|
|
{
|
|
.Targets = { '$ProjectName$-Debug', '$ProjectName$-Profile', '$ProjectName$-Release' }
|
|
}
|
|
}
|