removed most stuff in bff only kep way to generate solution

This commit is contained in:
2026-07-23 20:29:20 -04:00
parent 4096e9d1ba
commit 0d6b196ce6
22 changed files with 75 additions and 1468 deletions
-9
View File
@@ -161,9 +161,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\build.bat $(Configuration) $(SolutionName)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\build.bat -clean $(Configuration) $(SolutionName)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;JULIET_DEBUG;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4626 /wd5026 /wd5027 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\x64-$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
@@ -171,9 +168,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\build.bat $(Configuration) $(SolutionName)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\build.bat -clean $(Configuration) $(SolutionName)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;PROFILING_ENABLED;JULIET_ENABLE_IMGUI;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4626 /wd5026 /wd5027 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\x64-$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
@@ -181,9 +175,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>cd $(SolutionDir) &amp; misc\build.bat $(Configuration) $(SolutionName)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd $(SolutionDir) &amp; misc\build.bat -clean $(Configuration) $(SolutionName)</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;IMGUI_API=__declspec(dllexport);</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>..\;imgui;imgui\backends;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
<AdditionalOptions>/std:c++20 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4626 /wd5026 /wd5027 /wd4365 /wd5219 </AdditionalOptions>
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\x64-$(Configuration)\</LocalDebuggerWorkingDirectory>
<IntDir>$(SolutionDir)\Intermediate</IntDir>
<OutDir>$(SolutionDir)\bin</OutDir>
+4 -67
View File
@@ -1,78 +1,15 @@
// ImGui - DLL
// ImGui
//------------------------------------------------------------------------------
{
.ProjectName = 'ImGui'
.ProjectPath = 'External/imgui'
// Unity
// Configurations
//--------------------------------------------------------------------------
Unity( '$ProjectName$-Unity' )
ForEach( .BuildConfigName in .BuildConfigs )
{
.UnityInputFiles = {
'$ProjectPath$/imgui.cpp',
'$ProjectPath$/imgui_demo.cpp',
'$ProjectPath$/imgui_draw.cpp',
'$ProjectPath$/imgui_tables.cpp',
'$ProjectPath$/imgui_widgets.cpp',
'$ProjectPath$/backends/imgui_impl_win32.cpp',
'$ProjectPath$/backends/imgui_impl_dx12.cpp'
}
.UnityOutputPath = 'Intermediate/$ProjectPath$/'
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
.UnityMaxFiles = 1
}
// Library
//--------------------------------------------------------------------------
ForEach( .BuildConfig in .BuildConfigs )
{
Using( .BuildConfig )
.OutputBase + '\$Platform$-$BuildConfigName$'
// ObjectList (no Unity for external code)
//--------------------------------------------------------------------------
ObjectList( '$ProjectName$-Objs-$Platform$-$BuildConfigName$' )
{
// Input (Unity)
.CompilerInputUnity = '$ProjectName$-Unity'
// Extra Compiler Options
.CompilerOptions + ' "-I$ProjectPath$"'
+ ' "-I$ProjectPath$/backends"'
.CompilerOptions + ' -DIMGUI_API=__declspec(dllexport)'
+ ' /wd4365' // signed/unsigned mismatch
+ ' /wd5219' // implicit conversion to float
+ ' -WX-' // disable warnings as errors for external code
// Output
.CompilerOutputPath = '$OutputBase$/$ProjectName$/'
}
// --- DLL BUILD ---
DLL( '$ProjectName$-Lib-$Platform$-$BuildConfigName$' )
{
.Libraries = { '$ProjectName$-Objs-$Platform$-$BuildConfigName$' }
.LinkerOutput = '$BinPath$/$Platform$-$BuildConfigName$/$ProjectName$.dll'
#if __WINDOWS__
.LinkerOptions + ' /DLL'
.LinkerOptions + .CommonWinLibs
.CRTLibs = .CRTLibs_Dynamic
If ( .BuildConfigName == 'Debug' )
{
^CRTLibs = .CRTLibs_DynamicDebug
}
.LinkerOptions + .CRTLibs
#endif
}
Alias( '$ProjectName$-$Platform$-$BuildConfigName$' ) { .Targets = '$ProjectName$-Lib-$Platform$-$BuildConfigName$' }
^'Targets_$Platform$_$BuildConfigName$' + { '$ProjectName$-$Platform$-$BuildConfigName$' }
#if __WINDOWS__
.ProjectConfig = [ Using( .'Project_$Platform$_$BuildConfigName$' ) .Target = '$ProjectName$-$Platform$-$BuildConfigName$' ]
.ProjectConfig = [ Using( .'Project_x64_$BuildConfigName$' ) ]
^ProjectConfigs + .ProjectConfig
#endif
}
-2
View File
@@ -1,2 +0,0 @@
.CPPVersion = ' /std:c++20'
.CPPCompilerWarningOptions = ' -Wno-c++20-compat'
-3
View File
@@ -1,3 +0,0 @@
#if __WINDOWS__
#include "Windows/Clang.bff"
#endif
-221
View File
@@ -1,221 +0,0 @@
// Clang 19.x.x
//------------------------------------------------------------------------------
//
// Detect Clang
//
// We search in the following locations, in order of preference:
// 1) Vendorized in External (side by side with this bff)
// 2) Part of a Visual Studio installation (Program Files)
// 3) Default install location
//
#include "../../CPP/CPPHelper.bff"
#if file_exists( "19.1.5/bin/clang-cl.exe" )
// Vendorized
.Clang19_BasePath = '$_CURRENT_BFF_DIR_$/19.1.5'
.Clang19_Version = '19.1.5'
#else
#if file_exists( "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/LLVM/x64/bin/clang-cl.exe" )
// Installed with VS2022
.Clang19_BasePath = 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/LLVM/x64'
.Clang19_Version = '19.x.x'
#else
#if file_exists( "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/LLVM/x64/bin/clang-cl.exe" )
// Installed with VS2022
.Clang19_BasePath = 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/LLVM/x64'
.Clang19_Version = '19.x.x'
#else
#if file_exists( "C:/Program Files/LLVM/bin/clang-cl.exe" )
// Default Install
.Clang19_BasePath = 'C:/Program Files/LLVM'
.Clang19_Version = '19.x.x'
#else
//
// Failed
//
Print( '----------------------------------------------------------------------' )
Print( '- Unable to auto-detect Clang - please specify installation manually -' )
Print( '----------------------------------------------------------------------' )
.Clang19_BasePath = .Set_Path_Here // <-- Set path here
.Clang19_Version = .Set_Version_Here // <-- Set version here
#endif
#endif
#endif
#endif
// Print details of used version. TODO:C Move to Clang.bff
Print( 'Using Clang $Clang19_Version$ from $Clang19_BasePath$' )
// Compiler
//------------------------------------------------------------------------------
Compiler( 'Compiler-Clang19' )
{
.Root = '$Clang19_BasePath$'
.ExtraFiles = {
'$Root$/bin/concrt140.dll'
'$Root$/bin/msvcp140.dll'
'$Root$/bin/vcruntime140.dll'
'$Root$/bin/vcruntime140_1.dll'
}
.Executable = '$Root$\bin\clang-cl.exe'
// Allow tests to activate some experimental behavior
#if ENABLE_RELATIVE_PATHS
.UseRelativePaths_Experimental = true
#endif
#if ENABLE_SOURCE_MAPPING
.SourceMapping_Experimental = '/fastbuild-test-mapping'
#endif
}
// Compiler
//------------------------------------------------------------------------------
Compiler( 'Compiler-Clang19-NonCL' )
{
.Root = '$Clang19_BasePath$'
.ExtraFiles = {
'$Root$/bin/msvcp140.dll'
'$Root$/bin/vcruntime140.dll'
}
.Executable = '$Root$\bin\clang.exe'
// Allow tests to activate some experimental behavior
#if ENABLE_RELATIVE_PATHS
.UseRelativePaths_Experimental = true
#endif
#if ENABLE_SOURCE_MAPPING
.SourceMapping_Experimental = '/fastbuild-test-mapping'
#endif
}
// ToolChain
//------------------------------------------------------------------------------
.ToolChain_Clang_Windows_Common =
[
// Clang for Windows relies on the VS being present:
// - crt headers
// - crt libs/dlls
Using( .ToolChain_VS_Windows_X64 )
.Platform = 'x64Clang'
// Librarian
.Librarian = '$Clang19_BasePath$\bin\llvm-ar.exe'
.LibrarianOptions = 'rc "%2" "%1"' // NOTE: output must come first
// = '/c echo %1 > %2' // Debug options
// Linker
.Linker = '$Clang19_BasePath$\bin\lld-link.exe'
.LinkerOptions = '/NODEFAULTLIB /WX /NOLOGO /INCREMENTAL:NO /OUT:"%2" "%1" /DEBUG'
+ .VSLibPaths
// Compiler Warnings
.CommonCompilerWarningOptions // Enable warnings
= ' -Wall -Wextra -Weverything' // All warnings
+ ' -Werror -Wfatal-errors' // Warnings as fatal errors
// Warnings that are not useful
+ ' -Wno-#pragma-messages' // warning : %s [-W#pragma-messages]
+ ' -Wno-c++98-compat-pedantic' // variadic macros are incompatible with C++98
+ ' -Wno-exit-time-destructors' // declaration requires an exit-time destructor
+ ' -Wno-global-constructors' // declaration requires a global destructor
+ ' -Wno-invalid-offsetof' // we get the offset of members in non-POD types
+ ' -Wno-missing-prototypes' // no previous prototype for function '%s'
+ ' -Wno-missing-variable-declarations' // no previous extern declaration for non-static variable '%s'
+ ' -Wno-gnu-line-marker' // Clang complains about directives its own preprocessor generated
+ ' -Wno-switch-enum' // Allow the use of "default" labels (we keep -Wswitch to ensure all cases are handled)
+ ' -Wno-switch-default' // Don't require default: when all cases are already handled
+ .CPPCompilerWarningOptions
// Warnings that fire but might be best to be fixed
+ ' -Wno-anon-enum-enum-conversion' // conversions between unrelated anonymous enums
+ ' -Wno-cast-function-type-strict' // converts to incompatible function type
+ ' -Wno-cast-qual' // cast from 'const %s *' to '%s *' drops const qualifier
+ ' -Wno-deprecated-copy-dtor' // definition of implicit copy constructor for '%s' is deprecated because it has a user-declared destructor
+ ' -Wno-missing-noreturn' // function '%s' could be declared with attribute 'noreturn'
+ ' -Wno-old-style-cast' // use of old-style cast
+ ' -Wno-unsafe-buffer-usage' // unsafe pointer arithmetic
// File Extensions
.LibExtension = '.a'
.ExeExtension = '.exe'
]
// ToolChain
//------------------------------------------------------------------------------
.ToolChain_Clang_Windows =
[
Using( .ToolChain_Clang_Windows_Common )
// Compiler Options
.Compiler = 'Compiler-Clang19'
.CommonCompilerOptions = ' -c' // Compile only
+ ' /Z7' // Include debug info
+ ' -D_CRT_SECURE_NO_WARNINGS'
// Unicode
+ ' /utf-8'
+ ' /D "_UNICODE" /D "UNICODE"'
// Include paths
+ ' -I"./"'
+ .VSIncludePaths_ClangCl
// x64
+ ' -m64'
+ ' --target=x86_64-windows-msvc'
// No RTTI
+ ' /GR-'
// No Exceptions
+ ' /EHs-c-'
// Warnings
+ .CommonCompilerWarningOptions
.CompilerOptions = ' /TP -o"%2" "%1" $CommonCompilerOptions$'
+ .CPPVersion
.CompilerOptionsC = ' /TC -o"%2" "%1" $CommonCompilerOptions$'
.PCHOptions = ' /TP $CommonCompilerOptions$ "%1" /Fo"%3" /Fp"%2" /Yc"PrecompiledHeader.h"'
+ .CPPVersion
]
// ToolChain
//------------------------------------------------------------------------------
.ToolChain_ClangNonCL_Windows =
[
Using( .ToolChain_Clang_Windows_Common )
// Compiler Options
.Compiler = 'Compiler-Clang19-NonCL'
.CommonCompilerOptions = ' -c' // Compile only
+ ' -g' // Include debug info
+ ' -D_CRT_SECURE_NO_WARNINGS'
// Unicode
+ ' /utf-8'
+ ' /D "_UNICODE" /D "UNICODE"'
// Include paths
+ ' "-I./"'
// x64
+ ' -m64'
+ ' --target=x86_64-windows-msvc'
// No RTTI
+ ' -fno-rtti'
// No Exceptions
+ ' -fno-exceptions'
// Warnings
+ .CommonCompilerWarningOptions
.CompilerOptions = ' -x c++ -o"%2" "%1" $CommonCompilerOptions$'
+ .CPPVersion
.CompilerOptionsC = ' -x c -o"%2" "%1" $CommonCompilerOptions$'
]
//------------------------------------------------------------------------------
-334
View File
@@ -1,334 +0,0 @@
// Visual Studio 2022
//------------------------------------------------------------------------------
//
// Detect VS2022
//
// We search in the following locations, in order of preference:
// 1) Vendorized in External (side by side with this bff)
// 2) Specified via environment variables (VS Command Prompt)
// 3) Part of a Visual Studio installation (Program Files)
//
#include "../CPP/CPPHelper.bff"
#if file_exists( "2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe" )
//
// Use vendorized toolchain - v17.14.16
//
.VS2022_BasePath = '$_CURRENT_BFF_DIR_$/2022/Community/VC'
.VS2022_Version = '14.44.35207'
.VS2022_MSC_VER = '1944'
#define MSVC_DYNAMIC_DEOPT_AVAILABLE
#else
//
// Use environment variable if available (VS Command Prompt)
//
#if exists( VS170COMNTOOLS )
#import VCINSTALLDIR
#import VCToolsVersion
.VS2022_BasePath = .VCINSTALLDIR
.VS2022_Version = .VCToolsVersion
.VS2022_MSC_VER = '1944' // NOTE: This cannot be detected and may be incorrect
#else
//
// Use Visual Studio installation
//
#if file_exists( "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe" )
// v17.14.9
.VS2022_BasePath = 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC'
.VS2022_Version = '14.44.35207'
.VS2022_MSC_VER = '1944'
#define MSVC_DYNAMIC_DEOPT_AVAILABLE
#else
//
// Use Visual Studio 2022 Enterprise installation (used by GitHub Actions)
//
#if file_exists( "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe" )
// v17.14.9
.VS2022_BasePath = 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC'
.VS2022_Version = '14.44.35207'
.VS2022_MSC_VER = '1944'
#define MSVC_DYNAMIC_DEOPT_AVAILABLE
#else
//
// Failed
//
Print( '-----------------------------------------------------------------------' )
Print( '- Unable to auto-detect VS2022 - please specify installation manually -' )
Print( '-----------------------------------------------------------------------' )
.VS2022_BasePath = .Set_Path_Here // <-- Set path here
.VS2022_Version = .Set_Version_Here // <-- Set version here
.VS2022_MSC_VER = .Set_MSC_VER_Here // <-- Set MSC_VER here
#endif
#endif
#endif
#endif
.VS2022_ToolchainPath = '$VS2022_BasePath$/Tools/MSVC/$VS2022_Version$'
// X64 Compiler
//------------------------------------------------------------------------------
Compiler( 'Compiler-VS2022-x64' )
{
.Root = '$VS2022_ToolchainPath$/bin/Hostx64/x64'
.Executable = '$Root$/cl.exe'
.ExtraFiles = { '$Root$/c1.dll',
'$Root$/c1xx.dll',
'$Root$/c2.dll',
'$Root$/msobj140.dll',
'$Root$/mspdb140.dll',
'$Root$/mspdbcore.dll',
'$Root$/mspdbsrv.exe',
'$Root$/mspft140.dll',
'$Root$/msvcp140.dll',
'$Root$/msvcp140_atomic_wait.dll', // Required circa 16.8.3 (14.28.29333)
'$Root$/tbbmalloc.dll', // Required as of 16.2 (14.22.27905)
'$Root$/vcruntime140.dll',
'$Root$/vcruntime140_1.dll', // Required as of 16.5.1 (14.25.28610)
'$Root$/1033/clui.dll',
'$Root$/1033/mspft140ui.dll' // Localized messages for static analysis
}
#if MSVC_DYNAMIC_DEOPT_AVAILABLE
+ '$Root$/c2dd.dll' // Dynamic Deoptimization as of 17.14.0 (14.44.34918)
#endif
#if ENABLE_LIGHT_CACHE
.UseLightCache_Experimental = true
#endif
}
// ARM64 Compiler
//------------------------------------------------------------------------------
Compiler( 'Compiler-VS2022-ARM64' )
{
.Root = '$VS2022_ToolchainPath$/bin/Hostx64/arm64'
.Executable = '$Root$/cl.exe'
.ExtraFiles = { '$Root$/c1.dll',
'$Root$/c1xx.dll',
'$Root$/c2.dll',
'$Root$/msobj140.dll',
'$Root$/mspdb140.dll',
'$Root$/mspdbcore.dll',
'$Root$/mspdbsrv.exe',
'$Root$/mspft140.dll',
'$Root$/msvcp140.dll',
'$Root$/msvcp140_atomic_wait.dll', // Required circa 16.8.3 (14.28.29333)
'$Root$/tbbmalloc.dll', // Required as of 16.2 (14.22.27905)
'$Root$/vcruntime140.dll',
'$Root$/vcruntime140_1.dll', // Required as of 16.5.1 (14.25.28610)
'$Root$/1033/clui.dll',
'$Root$/1033/mspft140ui.dll' // Localized messages for static analysis
}
#if ENABLE_LIGHT_CACHE
.UseLightCache_Experimental = true
#endif
}
// Common Toolchain for Windows
//------------------------------------------------------------------------------
.Toolchain_VS2022_Windows =
[
// Paths
.VSIncludePaths = ' /external:W0 /external:I"$VS2022_ToolchainPath$/include/"'
.VSIncludePaths_ClangCl = ' /imsvc "$VS2022_ToolchainPath$/include/"'
.VCPackagesPath = '$VS2022_BasePath$/../Common7/IDE/VC/vcpackages'
// Compiler
.CommonCompilerOptions = ' /Z7 /nologo /c'
+ ' /Zc:inline' // Remove unreferenced COMDATs at compile time (VS2013.2+)
+ ' /Zc:strictStrings' // Require const only usage of string literals (VS2013+)
+ ' /fp:fast'
+ ' /diagnostics:caret' // Use improved warning/error messages
+ .CPPVersion
+ ' /permissive-' // Require conformant code
+ ' /Gm-' // No RTTI
+ ' /GR-' // No RTTI
+ ' /EHa-' // No exceptions
+ ' /Oi' // Use assembly intrinsics where possible
+ ' /Gy' // Function level linking
+ ' -D_CRT_SECURE_NO_WARNINGS'
+ ' /utf-8'
+ ' /D "_UNICODE" /D "UNICODE"'
// Warnings
+ ' /Wall' // Enable all warnings (we'll disable those that are not useful)
+ ' /WX' // Warnings as errors
// These warnings need further investigation
+ ' /wd5267' // definition of implicit copy constructor for '%s' is deprecated because it has a user-provided destructor
// These warnings are not useful
+ ' /wd4061' // enumerator '%s' in switch of enum '%s' is not explicitly handled by a case label
+ ' /wd4505' // unreferenced function with internal linkage has been removed
+ ' /wd4514' // '%s': unreferenced inline function has been removed
+ ' /wd4577' // 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
+ ' /wd4625' // '%s' : copy constructor was implicitly defined as deleted
+ ' /wd4710' // '%s': function not inlined
+ ' /wd4711' // function '%s' selected for automatic inline expansion
+ ' /wd4746' // volatile access of '<expression>' is subject to /volatile:<iso|ms> setting; consider using __iso_volatile_load/store intrinsic functions
+ ' /wd4820' // '%s': '%u' bytes padding added after data member '%s'
+ ' /wd5045' // Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
+ ' /wd5220' // '%s': a non-static data member with a volatile qualified type no longer implies that compiler generated copy/move constructors and copy/move assignment operators are not trivial
+ ' /wd5245' // 'function': unreferenced function with internal linkage has been removed
+ ' /wd4626' // assignment operator was implicitly defined as deleted
+ ' /wd5026' // move constructor was implicitly defined as deleted
+ ' /wd5027' // move assignment operator was implicitly defined as deleted
// Include Paths
+ ' /I"./"'
+ .VSIncludePaths
.CompilerOptions = ' $CommonCompilerOptions$ "%1" /Fo"%2"'
.CompilerOptionsC = ' $CommonCompilerOptions$ "%1" /Fo"%2"'
.CompilerOptionsDeoptimized = ' $CommonCompilerOptions$ "%1" /Fo"%2"'
.PCHOptions = ' $CommonCompilerOptions$ "%1" /Fo"%3" /Fp"%2" /Yc"PrecompiledHeader.h"'
// Librarian
.LibrarianOptions = '/NODEFAULTLIB /WX /NOLOGO /OUT:"%2" "%1"'
+ ' /OPT:REF'
// Linker
.LinkerOptions = '/NODEFAULTLIB /WX /NOLOGO /INCREMENTAL:NO /OUT:"%2" "%1" /DEBUG'
+ ' /OPT:REF'
//CRT
.CRTLibs_Static = ' LIBCMT.LIB'
+ ' libvcruntime.lib'
+ ' libucrt.lib'
.CRTLibs_Dynamic = ' msvcrt.lib'
+ ' vcruntime.lib'
+ ' ucrt.lib'
+ ' msvcprt.lib'
.CRTLibs_DynamicDebug = ' msvcrtd.lib'
+ ' vcruntimed.lib'
+ ' ucrtd.lib'
+ ' msvcprtd.lib'
// File Extensions
.LibExtension = '.lib'
.ExeExtension = '.exe'
]
// X64 ToolChain for Windows
//------------------------------------------------------------------------------
.ToolChain_VS2022_Windows_X64 =
[
Using( .Toolchain_VS2022_Windows )
.Platform = 'x64'
// Paths
.VSLibPaths = ' /LIBPATH:"$VS2022_ToolchainPath$/lib/x64"'
// Compiler
.Compiler = 'Compiler-VS2022-X64'
// Librarian
.Librarian = '$VS2022_ToolchainPath$/bin/Hostx64/x64/lib.exe'
// Linker
.Linker = '$VS2022_ToolchainPath$/bin/Hostx64/x64/link.exe'
.LinkerOptions + .VSLibPaths
]
.ToolChain_VS2022_Windows_ARM64 =
[
Using( .Toolchain_VS2022_Windows )
.Platform = 'ARM64'
// Paths
.VSLibPaths = ' /LIBPATH:"$VS2022_ToolchainPath$/lib/arm64"'
// Compiler
.Compiler = 'Compiler-VS2022-ARM64'
// Librarian
.Librarian = '$VS2022_ToolchainPath$/bin/Hostx64/arm64/lib.exe'
// Linker
.Linker = '$VS2022_ToolchainPath$/bin/Hostx64/arm64/link.exe'
.LinkerOptions + .VSLibPaths
]
// PATH environment variable
//------------------------------------------------------------------------------
.VS_2022_PATH = '$VS2022_ToolchainPath$/Hostx64/x64'
// Platform Toolset for Project Generation
//------------------------------------------------------------------------------
.VS_2022_PlatformToolset = 'v143'
// _MSC_VER
//------------------------------------------------------------------------------
// VisualStudioSettings
//------------------------------------------------------------------------------
.VisualStudioSettings_VS2022 =
[
.VS_Version = .VS2022_Version
.VS_Version_HumanReadable = '2022'
.VS_SolutionVersion = '17'
.MSC_VER = .VS2022_MSC_VER
.VS_ToolchainPath = .VS2022_ToolchainPath
.ToolChain_VS_Windows_X64 = .ToolChain_VS2022_Windows_X64
.ToolChain_VS_Windows_ARM64 = .ToolChain_VS2022_Windows_ARM64
.VS_PATH = .VS_2022_PATH
.VS_PlatformToolset = .VS_2022_PlatformToolset
// Enable and specify analysis engine
.StaticAnalysisOptions = ' /analyze'
+ ' /analyze:plugin"$VS2022_ToolchainPath$\bin\HostX64\x64\EspXEngine.dll"'
+ ' /analyze:external-' // Disable analysis of external headers
// To investigate: These warnings might be useful and should be checked
+ ' /wd26400' // Do not assign the result of an allocation or a function call with an owner<T> return value to a raw pointer, use owner<T> instead (i.11).
+ ' /wd26401' // Do not delete a raw pointer that is not an owner<T> (i.11).
+ ' /wd26430' // Symbol '%s' is not tested for nullness on all paths (f.23).: Lines: ...
+ ' /wd26432' // If you define or delete any default operation in the type '%s', define or delete them all (c.21).
+ ' /wd26436' // The type '%s' with a virtual function needs either public virtual or protected non-virtual destructor (c.35).
+ ' /wd26438' // Avoid 'goto' (es.76).
+ ' /wd26451' // Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
+ ' /wd26460' // The reference argument '%s' for function '%s' can be marked as const (con.3).
+ ' /wd26475' // Do not use function style C-casts (es.49).
+ ' /wd26476' // Expression/symbol '%s' uses a naked union '%s' with multiple type pointers: Use variant instead (type.7).
+ ' /wd26491' // Don't use static_cast downcasts (type.2).
+ ' /wd26494' // Variable '%s' is uninitialized. Always initialize an object (type.5).
+ ' /wd26495' // Variable '%s' is uninitialized. Always initialize a member variable (type.6).
+ ' /wd26497' // The function '%s' could be marked constexpr if compile-time evaluation is desired (f.4).
+ ' /wd26814' // The const variable '%s' can be computed at compile-time. Consider using constexpr (con.5).
// These warnings are not useful. They either:
// a) Are about things we want to do or have no viable alternative
// b) Are nonsensical, undesirable or impractical
+ ' /wd26402' // Return a scoped object instead of a heap-allocated if it has a move constructor (r.3).
+ ' /wd26409' // Avoid calling new and delete explicitly, use std::make_unique<T> instead (r.11).
+ ' /wd26426' // Global initializer calls a non-constexpr function '%s' (i.22).
+ ' /wd26429' // Symbol '%s' is never tested for nullness, it can be marked as not_null (f.23).
+ ' /wd26435' // Function '%s' should specify exactly one of 'virtual', 'override', or 'final' (c.128).
+ ' /wd26439' // This kind of function may not throw. Declare it 'noexcept' (f.6).
+ ' /wd26440' // Function '%s' can be declared 'noexcept' (f.6).
+ ' /wd26446' // Prefer to use gsl::at() instead of unchecked subscript operator (bounds.4).
+ ' /wd26447' // The function is declared 'noexcept' but calls function '%s' which may throw exceptions (f.6).
+ ' /wd26455' // Default constructor may not throw. Declare it 'noexcept' (f.6).
+ ' /wd26457' // (void) should not be used to ignore return values, use 'std::ignore =' instead (es.48).
+ ' /wd26461' // The pointer argument '%s' for function '%s' can be marked as a pointer to const (con.3).
+ ' /wd26467' // Converting from floating point to unsigned integral types results in non-portable code if the double/float has a negative value. Use gsl::narrow_cast or gsl::narrow instead to guard against undefined behavior and potential data loss (es.46).
+ ' /wd26472' // Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast or gsl::narrow (type.1).
+ ' /wd26481' // Don't use pointer arithmetic. Use span instead (bounds.1).
+ ' /wd26482' // Only index into arrays using constant expressions (bounds.2).'
+ ' /wd26485' // Expression '%s': No array to pointer decay (bounds.3).
+ ' /wd26490' // Don't use reinterpret_cast (type.1).
+ ' /wd26492' // Don't use const_cast to cast away const or volatile (type.3).
+ ' /wd26493' // Don't use C-style casts (type.4).
+ ' /wd26826' // Don't use C-style variable arguments (f.55).
+ ' /wd26831' // Allocation size might be the result of a numerical overflow.
]
//------------------------------------------------------------------------------
-20
View File
@@ -1,20 +0,0 @@
// VisualStudio
//------------------------------------------------------------------------------
#if __WINDOWS__
// Select desired Visual Studio version
//------------------------------------------------------------------------------
#define USING_VS2022
// Activate
//------------------------------------------------------------------------------
.VisualStudioSettings = []
#if USING_VS2022
#include "VS2022.bff"
.VisualStudioSettings = .VisualStudioSettings_VS2022
#endif
Using( .VisualStudioSettings )
Print( 'Using VS$VS_Version_HumanReadable$ (v$VS_Version$) from $VS_ToolchainPath$' )
//------------------------------------------------------------------------------
#endif
-16
View File
@@ -1,16 +0,0 @@
// Windows
//------------------------------------------------------------------------------
#if __WINDOWS__
// The Windows 10 SDK is used regardless of which OS version is being targetted
#define USING_WINDOWS10_SDK
// Activate
//------------------------------------------------------------------------------
#if USING_WINDOWS10_SDK
#include "Windows10SDK.bff"
Alias( 'ResourceCompiler' ) { .Targets = 'ResourceCompiler-Windows10' }
#endif
//------------------------------------------------------------------------------
#endif
-121
View File
@@ -1,121 +0,0 @@
// Windows 10 SDK
//------------------------------------------------------------------------------
//
// Detect Windows 10 SDK
//
// We search in the following locations, in order of preference:
// 1) Vendorized in External (side by side with this bff)
// 2) Part of a Windows 10 installation (Program Files)
//
#if file_exists( "10\bin\10.0.26100.0\x64\RC.exe" )
//
// Use vendorized toolchain
//
.Windows10_SDKBasePath = '$_CURRENT_BFF_DIR_$\10'
.Windows10_SDKVersion = '10.0.26100.0'
#else
//
// Use Windows10SDK installation
//
#if file_exists( "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\RC.exe" )
.Windows10_SDKBasePath = 'C:\Program Files (x86)\Windows Kits\10'
.Windows10_SDKVersion = '10.0.26100.0'
#else
//
// Failed
//
Print( '-----------------------------------------------------------------------' )
Print( '- Unable to auto-detect Windows10SDK - please specify installation manually -' )
Print( '-----------------------------------------------------------------------' )
.Windows10_SDKBasePath = .Set_Path_Here // <-- Set path here
.Windows10_SDKVersion = .Set_Version_Here // <-- Set version here
#endif
#endif
// Defines
//------------------------------------------------------------------------------
.WindowsSDK_Defines = ' -DWIN32_LEAN_AND_MEAN'
+ ' -DWIN32'
+ ' -D_WIN32'
+ ' -D__WINDOWS__'
+ ' -D_HAS_EXCEPTIONS=0'
// Windows 10 SDK
//------------------------------------------------------------------------------
.Windows10_SDK =
[
#if USING_VS2022
.WindowsSDK_IncludePaths = ' "/external:I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/ucrt"'
+ ' "/external:I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/um"'
+ ' "/external:I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/shared"'
#else
.WindowsSDK_IncludePaths = ' "-I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/ucrt"'
+ ' "-I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/um"'
+ ' "-I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/shared"'
#endif
.WindowsSDK_IncludePaths_RC = ' "-I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/ucrt"'
+ ' "-I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/um"'
+ ' "-I$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/shared"'
.WindowsSDK_WinRTAssemblyPath = '$Windows10_SDKBasePath$/UnionMetadata/$Windows10_SDKVersion$/'
.CommonCompilerOptions = .WindowsSDK_IncludePaths
+ .WindowsSDK_Defines
+ ' -DWIN64'
.CompilerOptions = .CommonCompilerOptions
.CompilerOptionsC = .CommonCompilerOptions
.CompilerOptionsDeoptimized = .CommonCompilerOptions
.PCHOptions = .CommonCompilerOptions
]
.Windows10_SDK_X64 =
[
Using( .Windows10_SDK )
.LinkerOptions = ' /LIBPATH:"$Windows10_SDKBasePath$/Lib/$Windows10_SDKVersion$/um/x64"'
+ ' /LIBPATH:"$Windows10_SDKBasePath$/Lib/$Windows10_SDKVersion$/ucrt/x64"'
+ ' /MACHINE:X64'
]
.Windows10_SDK_ARM64 =
[
Using( .Windows10_SDK )
.LinkerOptions = ' /LIBPATH:"$Windows10_SDKBasePath$/Lib/$Windows10_SDKVersion$/um/arm64"'
+ ' /LIBPATH:"$Windows10_SDKBasePath$/Lib/$Windows10_SDKVersion$/ucrt/arm64"'
+ ' /MACHINE:ARM64'
]
.Windows10_SDK_X64_ClangCl =
[
// When using clang-cl, we can use these include paths to suppress compile errors
// inside system headers (which are full of problems)
.WindowsSDK_IncludePaths = ' /imsvc "$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/ucrt"'
+ ' /imsvc "$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/um"'
+ ' /imsvc "$Windows10_SDKBasePath$/Include/$Windows10_SDKVersion$/shared"'
.WindowsSDK_WinRTAssemblyPath = '$Windows10_SDKBasePath$/UnionMetadata/$Windows10_SDKVersion$/'
.CommonCompilerOptions = .WindowsSDK_IncludePaths
+ .WindowsSDK_Defines
+ ' -DWIN64'
.CompilerOptions = .CommonCompilerOptions
.CompilerOptionsC = .CommonCompilerOptions
.CompilerOptionsDeoptimized = .CommonCompilerOptions
.PCHOptions = .CommonCompilerOptions
.LinkerOptions = ' /LIBPATH:"$Windows10_SDKBasePath$/Lib/$Windows10_SDKVersion$/um/x64"'
+ ' /LIBPATH:"$Windows10_SDKBasePath$/Lib/$Windows10_SDKVersion$/ucrt/x64"'
+ ' /MACHINE:X64'
]
Compiler( 'ResourceCompiler-Windows10' )
{
.Executable = '$Windows10_SDKBasePath$/Bin/$Windows10_SDKVersion$/x64/RC.exe'
.CompilerFamily = 'custom'
}
// PATH environment variable
//------------------------------------------------------------------------------
.WINDOWS_SDK_2019_PATH = '$Windows10_SDKBasePath$/bin/$Windows10_SDKVersion$/x64'
//------------------------------------------------------------------------------