JD2022-TU1/main/extern/FastBuild/External/LZ4/lz4-r117/LZ4.bff

89 lines
3.2 KiB
Text

// LZ4
//------------------------------------------------------------------------------
.LZ4BasePath = '..\External\LZ4\lz4-r117'
.LZ4_Windows_MSVC = [ .LZ4IncludePaths = ' /I"$LZ4BasePath$"'
.LZ4CompilerOptions = ' /wd6262' // Function uses '%u' bytes of stack: exceeds /analyze:stacksize '16384'. Consider moving some data to heap.
+ ' /wd28251' // warning C28251: Inconsistent annotation for '_setjmp': this instance has no annotations. See <no file>(0).
]
.LZ4_Windows_Clang = [ .LZ4IncludePaths = ' -I"$LZ4BasePath$"'
.LZ4CompilerOptions = ' -x c++'
]
{
.ProjectName = 'LZ4'
.ProjectPath = '$LZ4BasePath$'
// Visual Studio Project Generation
//--------------------------------------------------------------------------
VCXProject( '$ProjectName$-proj' )
{
.ProjectOutput = '$ProjectPath$\$ProjectName$.vcxproj'
.ProjectInputPaths = '$ProjectPath$\'
.ProjectBasePath = '$ProjectPath$\'
}
// Only 1 file to build
.CompilerInputFiles = '$LZ4BasePath$\lz4.c'
// Windows (MSVC)
//--------------------------------------------------------------------------
ForEach( .Config in .Configs_Windows_MSVC )
{
Using( .Config )
.OutputBase + '\$Platform$-$Config$'
Using( .LZ4_Windows_MSVC )
// Static Library
Library( '$ProjectName$-Lib-$Platform$-$Config$' )
{
.CompilerOptions + .LZ4IncludePaths
+ .LZ4CompilerOptions
// Output
.CompilerOutputPath = '$OutputBase$\$ProjectName$\'
.LibrarianOutput = '$OutputBase$\$ProjectName$\$ProjectName$.lib'
}
Alias( '$ProjectName$-$Platform$-$Config$' ) { .Targets = '$ProjectName$-Lib-$Platform$-$Config$' }
}
// Windows (Clang)
//--------------------------------------------------------------------------
ForEach( .Config in .Configs_Windows_Clang )
{
Using( .Config )
.OutputBase + '\$Platform$-$Config$'
Using( .LZ4_Windows_Clang )
// Static Library
Library( '$ProjectName$-Lib-$Platform$-$Config$' )
{
.CompilerOptions + .LZ4IncludePaths
+ .LZ4CompilerOptions
// 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' }
}
}