fix build error in msvc
This commit is contained in:
Vendored
+9
-1
@@ -142,8 +142,11 @@ Compiler( 'Compiler-VS2022-ARM64' )
|
|||||||
+ ' /diagnostics:caret' // Use improved warning/error messages
|
+ ' /diagnostics:caret' // Use improved warning/error messages
|
||||||
+ .CPPVersion
|
+ .CPPVersion
|
||||||
+ ' /permissive-' // Require conformant code
|
+ ' /permissive-' // Require conformant code
|
||||||
|
+ ' /Gm-' // No RTTI
|
||||||
+ ' /GR-' // No RTTI
|
+ ' /GR-' // No RTTI
|
||||||
+ ' /EHs-c-' // No exceptions
|
+ ' /EHa-' // No exceptions
|
||||||
|
+ ' /Oi' // Use assembly intrinsics where possible
|
||||||
|
+ ' /Gy' // Function level linking
|
||||||
|
|
||||||
+ ' -D_CRT_SECURE_NO_WARNINGS'
|
+ ' -D_CRT_SECURE_NO_WARNINGS'
|
||||||
|
|
||||||
@@ -170,6 +173,9 @@ Compiler( 'Compiler-VS2022-ARM64' )
|
|||||||
+ ' /wd5045' // Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
|
+ ' /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
|
+ ' /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
|
+ ' /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
|
// Include Paths
|
||||||
+ ' /I"./"'
|
+ ' /I"./"'
|
||||||
@@ -182,9 +188,11 @@ Compiler( 'Compiler-VS2022-ARM64' )
|
|||||||
|
|
||||||
// Librarian
|
// Librarian
|
||||||
.LibrarianOptions = '/NODEFAULTLIB /WX /NOLOGO /OUT:"%2" "%1"'
|
.LibrarianOptions = '/NODEFAULTLIB /WX /NOLOGO /OUT:"%2" "%1"'
|
||||||
|
+ ' /OPT:REF'
|
||||||
|
|
||||||
// Linker
|
// Linker
|
||||||
.LinkerOptions = '/NODEFAULTLIB /WX /NOLOGO /INCREMENTAL:NO /OUT:"%2" "%1" /DEBUG'
|
.LinkerOptions = '/NODEFAULTLIB /WX /NOLOGO /INCREMENTAL:NO /OUT:"%2" "%1" /DEBUG'
|
||||||
|
+ ' /OPT:REF'
|
||||||
|
|
||||||
//CRT
|
//CRT
|
||||||
.CRTLibs_Static = ' LIBCMT.LIB'
|
.CRTLibs_Static = ' LIBCMT.LIB'
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
.UnityInputPath = '$ProjectPath$/'
|
.UnityInputPath = '$ProjectPath$/'
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
.UnityInputPath = '$ProjectPath$/'
|
.UnityInputPath = '$ProjectPath$/'
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
|
|||||||
@@ -11,10 +11,20 @@ ForEach( .BuildConfig in .ShaderCompilerConfigs )
|
|||||||
Using( .BuildConfig )
|
Using( .BuildConfig )
|
||||||
.OutputBase + '\$Platform$-$BuildConfigName$'
|
.OutputBase + '\$Platform$-$BuildConfigName$'
|
||||||
|
|
||||||
|
// Unity
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
Unity( '$ProjectName$-Unity-$Platform$-$BuildConfigName$' )
|
||||||
|
{
|
||||||
|
.UnityInputPath = '$ProjectPath$/'
|
||||||
|
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
||||||
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 5
|
||||||
|
}
|
||||||
|
|
||||||
// 2. Define the Build Targets for this specific configuration
|
// 2. Define the Build Targets for this specific configuration
|
||||||
ObjectList( '$ProjectName$-Obs-$Platform$-$BuildConfigName$' )
|
ObjectList( '$ProjectName$-Obs-$Platform$-$BuildConfigName$' )
|
||||||
{
|
{
|
||||||
.CompilerInputPath = '$ProjectPath$/'
|
.CompilerInputUnity = '$ProjectName$-Unity-$Platform$-$BuildConfigName$'
|
||||||
.CompilerOutputPath = '$OutputBase$/$ProjectPath$/'
|
.CompilerOutputPath = '$OutputBase$/$ProjectPath$/'
|
||||||
.CompilerOptions + ' "-IJuliet/include"'
|
.CompilerOptions + ' "-IJuliet/include"'
|
||||||
+ ' "-IJulietShaderCompiler"'
|
+ ' "-IJulietShaderCompiler"'
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
.UnityInputPath = '$ProjectPath$/src/'
|
.UnityInputPath = '$ProjectPath$/src/'
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
|
|||||||
+2
-2
@@ -142,8 +142,8 @@ Settings
|
|||||||
#if __WINDOWS__
|
#if __WINDOWS__
|
||||||
.ProjectCommon =
|
.ProjectCommon =
|
||||||
[
|
[
|
||||||
.ProjectBuildCommand = 'cd ^$(SolutionDir) & misc\fbuild -ide -dist -monitor -cache ^$(ProjectName)-^$(Configuration)'
|
.ProjectBuildCommand = 'cd ^$(SolutionDir) & misc\build.bat ^$(ProjectName)-^$(Configuration)'
|
||||||
.ProjectRebuildCommand = 'cd ^$(SolutionDir) & misc\fbuild -ide -dist -monitor -cache -clean ^$(ProjectName)-^$(Configuration)'
|
.ProjectRebuildCommand = 'cd ^$(SolutionDir) & misc\build.bat -clean ^$(ProjectName)-^$(Configuration)'
|
||||||
.OutputDirectory = '^$(SolutionDir)\bin'
|
.OutputDirectory = '^$(SolutionDir)\bin'
|
||||||
.IntermediateDirectory = '^$(SolutionDir)\Intermediate'
|
.IntermediateDirectory = '^$(SolutionDir)\Intermediate'
|
||||||
.BuildLogFile = '^$(SolutionDir)\Intermediate\^$(ProjectName)-^$(Configuration).log'
|
.BuildLogFile = '^$(SolutionDir)\Intermediate\^$(ProjectName)-^$(Configuration).log'
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
:: ------------------------------------------------------------------------------
|
||||||
|
:: FastBuild Unity Build Script (Located in misc/)
|
||||||
|
:: ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
set SCRIPT_DIR=%~dp0
|
||||||
|
cd /d "%SCRIPT_DIR%.."
|
||||||
|
|
||||||
|
set FBUILD=misc\fbuild.exe
|
||||||
|
set CONFIG=Debug
|
||||||
|
set TARGETS=
|
||||||
|
|
||||||
|
if not exist "%FBUILD%" (
|
||||||
|
echo [ERROR] Could not find %FBUILD%. Please check workspace setup.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
:parse_args
|
||||||
|
if "%~1"=="" goto run_build
|
||||||
|
|
||||||
|
if /i "%~1"=="debug" (
|
||||||
|
set CONFIG=Debug
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
)
|
||||||
|
|
||||||
|
if /i "%~1"=="release" (
|
||||||
|
set CONFIG=Release
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
)
|
||||||
|
|
||||||
|
if /i "%~1"=="profile" (
|
||||||
|
set CONFIG=Profile
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
)
|
||||||
|
|
||||||
|
if /i "%~1"=="clean" (
|
||||||
|
echo Cleaning build artifacts...
|
||||||
|
"%FBUILD%" -clean
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
|
||||||
|
if /i "%~1"=="julietapp" (
|
||||||
|
set TARGETS=!TARGETS! JulietApp-x64-%CONFIG%
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
)
|
||||||
|
|
||||||
|
if /i "%~1"=="romeo" (
|
||||||
|
set TARGETS=!TARGETS! Romeo-x64-%CONFIG%
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
)
|
||||||
|
|
||||||
|
if /i "%~1"=="shader" (
|
||||||
|
set TARGETS=!TARGETS! JulietShaderCompiler-x64Clang-%CONFIG%
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
)
|
||||||
|
|
||||||
|
if /i "%~1"=="unity-only" (
|
||||||
|
echo Generating Unity files only...
|
||||||
|
"%FBUILD%" JulietApp-Unity-x64-%CONFIG% Romeo-Unity-x64-%CONFIG% JulietShaderCompiler-Unity-x64Clang-%CONFIG%
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
|
||||||
|
:: If target name passed explicitly
|
||||||
|
set TARGETS=!TARGETS! %~1
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
|
||||||
|
:run_build
|
||||||
|
if "!TARGETS!"=="" (
|
||||||
|
echo Building default targets (JulietApp, Romeo, JulietShaderCompiler) [%CONFIG%]...
|
||||||
|
set TARGETS=JulietApp-x64-%CONFIG% Romeo-x64-%CONFIG% JulietShaderCompiler-x64Clang-%CONFIG%
|
||||||
|
) else (
|
||||||
|
echo Building targets: !TARGETS! [%CONFIG%]...
|
||||||
|
)
|
||||||
|
|
||||||
|
"%FBUILD%" -summary -showcmds !TARGETS!
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
Reference in New Issue
Block a user