mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 06:06:50 +00:00
74 lines
3.8 KiB
Plaintext
74 lines
3.8 KiB
Plaintext
// Settings for /analyze are in a separate .vpc file so that they can be
|
|
// changed without triggering a full rebuild of non-analyze builds. On non-analyze
|
|
// builds the analyze.vpc file will not be listed as a dependency.
|
|
$Include "$SRCDIR\vpc_scripts\source_win32_analyze.vpc" [$ANALYZE]
|
|
|
|
$Conditional $AT_LEAST_VS2015 "true" [$VS2015]
|
|
$Conditional $AT_LEAST_VS2013 "true" [$VS2013 || $AT_LEAST_VS2015]
|
|
|
|
$Configuration
|
|
{
|
|
$General
|
|
{
|
|
// Request a specific compiler toolset.
|
|
$PlatformToolset "v100" [$VS2010]
|
|
$PlatformToolset "v110_xp" [$VS2012 && !$ANALYZE] // VS 2012 targeting Windows XP - http://msdn.microsoft.com/en-us/library/vstudio/jj851139.aspx
|
|
$PlatformToolset "v110" [$VS2012 && $ANALYZE] // VS 2012 for /analyze
|
|
$PlatformToolset "v120_xp" [$VS2013 && !$ANALYZE] // VS 2013 targeting Windows XP - http://msdn.microsoft.com/en-us/library/vstudio/jj851139.aspx
|
|
$PlatformToolset "v120" [$VS2013 && $ANALYZE] // VS 2013 for /analyze
|
|
$PlatformToolset "v140_xp" [$VS2015 && !$ANALYZE] // VS 2015 for /analyze
|
|
$PlatformToolset "v140" [$VS2015 && $ANALYZE] // VS 2015 for /analyze
|
|
$PlatformToolset "v142" [$VS2019] // VS 2019
|
|
}
|
|
|
|
$General
|
|
{
|
|
$ExecutableDirectories "$(ExecutablePath);$(Path)"
|
|
// We need to override mt.exe for Win7 compatibiity. Append paths before $(ExecutablePath) if you need VS to use your tools rather than its own
|
|
$ExecutableDirectories "$SRCDIR\devtools\vstools;$BASE"
|
|
// VS 2012 compiles fine but does not link. We want to redirect to stub versions of
|
|
// the tools (like link.exe and mt.exe) so that the link stage will be NOPed when
|
|
// doing /analyze builds.
|
|
$ExecutableDirectories "$SRCDIR\devtools\vs_nop_tools;$BASE" [$ANALYZE]
|
|
}
|
|
|
|
$Compiler
|
|
{
|
|
$MultiProcessorCompilation "True"
|
|
|
|
// warning C4316: object allocated on the heap may not be aligned 16
|
|
$DisableSpecificWarnings "$BASE;4316" [$AT_LEAST_VS2013]
|
|
|
|
// following are needed for VS2015 using old Windows SDK. Would like to move to each include location
|
|
$DisableSpecificWarnings "$BASE;4577;4091" [$WINDOWS && $AT_LEAST_VS2015]
|
|
|
|
|
|
// Having lots of warnings makes it harder to notice new, and possibly
|
|
// important warnings, both on buildbot and in the output window. Lots
|
|
// of warnings also makes it harder to skip through errors in the output
|
|
// window since F8 stops on both warnings and errors. The only way to
|
|
// keep the warning count down is to have warnings-as-errors.
|
|
// We will not be warning free on 64-bit for a while...
|
|
//$TreatWarningsAsErrors "Yes (/WX)" [!$ANALYZE && !$WIN64]
|
|
|
|
// Defines to differentiate 32 from 64 bit builds
|
|
$PreprocessorDefinitions "$BASE;PLATFORM_64BITS;WIN64;_WIN64;COMPILER_MSVC64" [$WIN64]
|
|
$PreprocessorDefinitions "$BASE;COMPILER_MSVC32" [$WIN32]
|
|
|
|
// /Gw is a VS 2013 option that puts global and static variables in individual sections so that the
|
|
// linker can discard unreferenced data. When building @client /dota with linker optimizations this
|
|
// reduces the client.dll size by about 1.14%. When linker optimizations are disabled this has no
|
|
// effect. This option does not show up in the IDE so we need to add it in $AdditionalOptions.
|
|
// http://blogs.msdn.com/b/vcblog/archive/2013/09/11/introducing-gw-compiler-switch.aspx
|
|
$AdditionalOptions "$BASE /Gw" [$AT_LEAST_VS2013]
|
|
// Strip unreferenced inline functions from object files to shrink .obj files and .lib files,
|
|
// improve linker speed, and improve conformance. Requires VS 2013 Update 3
|
|
$AdditionalOptions "$BASE /Zc:inline" [$AT_LEAST_VS2013]
|
|
|
|
$AdditionalOptions "$BASE /Zc:threadSafeInit-" [$AT_LEAST_VS2015] //thread-safe static initialization will crash on Windows XP if the dll is dynamically loaded
|
|
|
|
$AdditionalOptions "$BASE /Wv:18" [$AT_LEAST_VS2015&&!$WARN_ALL] //warning C4456: declaration of 'accFactorZ' hides previous local declaration suppression
|
|
|
|
}
|
|
}
|