aboutsummaryrefslogtreecommitdiff
path: root/mp/src/vpc_scripts
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2014-05-15 13:59:18 -0700
committerJoe Ludwig <[email protected]>2014-05-15 13:59:18 -0700
commit53e78c503e6e9c7d15e2eefc480755fe37dd7077 (patch)
treec8cc106eb4c0a2b2b5d79f534f2facb0514f5f55 /mp/src/vpc_scripts
parentAdded many shader source files (diff)
downloadsource-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.tar.xz
source-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.zip
General:
* Upgraded Steamworks SDK to v1.29 * Fixed mod compatibility problem with Multiplayer Base that was introduced in September. * In Hammer, while using the Vertex Tool, pressing CTRL+B will snap selected vertices to the grid. Virtual Reality: * Mods that support virtual reality now need to have a line in gameinfo.txt that says “supportsvr 1”. This indicates to gameui and engine that certain UI should be enabled. * VR-enabled mods will now start up in VR mode when launched from Steam’s VR mode. Windows: * Upgraded to Visual Studio 2013. If you need to build projects for VS 2010, add /2010 to your VPC command line. OSX: * Upgraded to XCode 5.
Diffstat (limited to 'mp/src/vpc_scripts')
-rw-r--r--mp/src/vpc_scripts/source_dll_base.vpc4
-rw-r--r--mp/src/vpc_scripts/source_dll_win32_base.vpc7
-rw-r--r--mp/src/vpc_scripts/source_dll_win32_debug.vpc1
-rw-r--r--mp/src/vpc_scripts/source_dll_win32_release.vpc4
-rw-r--r--mp/src/vpc_scripts/source_exe_base.vpc2
-rw-r--r--mp/src/vpc_scripts/source_exe_con_base.vpc2
-rw-r--r--mp/src/vpc_scripts/source_exe_con_win32_base.vpc2
-rw-r--r--mp/src/vpc_scripts/source_exe_win_win32_base.vpc7
-rw-r--r--mp/src/vpc_scripts/source_exe_win_win32_debug.vpc2
-rw-r--r--mp/src/vpc_scripts/source_exe_win_win32_release.vpc4
-rw-r--r--mp/src/vpc_scripts/source_lib_base.vpc2
-rw-r--r--mp/src/vpc_scripts/source_lib_win32_base.vpc2
-rw-r--r--mp/src/vpc_scripts/source_lib_win32_debug.vpc3
-rw-r--r--mp/src/vpc_scripts/source_lib_win32_release.vpc9
-rw-r--r--mp/src/vpc_scripts/source_win32_analyze.vpc65
-rw-r--r--mp/src/vpc_scripts/source_win32_base.vpc55
16 files changed, 108 insertions, 63 deletions
diff --git a/mp/src/vpc_scripts/source_dll_base.vpc b/mp/src/vpc_scripts/source_dll_base.vpc
index 16e565ec..f8d90184 100644
--- a/mp/src/vpc_scripts/source_dll_base.vpc
+++ b/mp/src/vpc_scripts/source_dll_base.vpc
@@ -10,7 +10,7 @@ $Include "$SRCDIR\vpc_scripts\source_video_base.vpc"
$Configuration
{
- $General [$VS2010]
+ $General
{
$TargetExtension "$OUTDLLEXT"
}
@@ -20,6 +20,6 @@ $Configuration
$PreprocessorDefinitions "$BASE;DEV_BUILD" [!$PUBLISH]
$PreprocessorDefinitions "$BASE;_PROFILE" [$PROFILE && !$RETAIL]
$PreprocessorDefinitions "$BASE;RETAIL_ASSERTS" [$RETAIL && $RETAILASSERTS]
- $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" [$NOFPO || $VS2010]
+ $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" // This is now always true.
}
}
diff --git a/mp/src/vpc_scripts/source_dll_win32_base.vpc b/mp/src/vpc_scripts/source_dll_win32_base.vpc
index 1507687e..cec539ad 100644
--- a/mp/src/vpc_scripts/source_dll_win32_base.vpc
+++ b/mp/src/vpc_scripts/source_dll_win32_base.vpc
@@ -24,7 +24,7 @@ $IgnoreRedundancyWarning "ON"
// Common Configuration
$Configuration
{
- $General [$VS2010]
+ $General
{
$TargetName "$OUTBINNAME"
}
@@ -50,6 +50,7 @@ $Configuration
// Suppress this pointless warning using the undocumented /ignore linker switch
// schemalib.lib(schemaclassinfo.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
$AdditionalOptions "$BASE /ignore:4221"
+ $AdditionalOptions "$BASE $SRCDIR\lib\public\ftol3.obj" [$VS2013 && $WIN32 && !$DISABLE_FTOL3_OVERRIDE && !$SOURCESDK] // Work around CRT bug https://connect.microsoft.com/VisualStudio/feedback/details/806362/vc12-pollutes-the-floating-point-stack-when-casting-infinity-nan-to-unsigned-long#
}
$PreBuildEvent
@@ -105,8 +106,8 @@ $Project
}
// Implement __imp__EncodePointer and __imp__DecodePointer so that we can run on XP SP1
- // when building with VS 2010.
- $File "$SRCDIR\public\tier0\pointeroverride.asm" [$WIN32 && $VS2010]
+ // when building with VS 2010 and higher.
+ $File "$SRCDIR\public\tier0\pointeroverride.asm" [$WIN32]
{
$Configuration
{
diff --git a/mp/src/vpc_scripts/source_dll_win32_debug.vpc b/mp/src/vpc_scripts/source_dll_win32_debug.vpc
index aa8ebf13..c5b786d2 100644
--- a/mp/src/vpc_scripts/source_dll_win32_debug.vpc
+++ b/mp/src/vpc_scripts/source_dll_win32_debug.vpc
@@ -166,7 +166,6 @@ $Configuration "Debug"
$ManifestFile
$AdditionalManifestDependencies
$AllowIsolation
- //$UACExecutionLevel [$VS2010]
// Debugging
$GenerateDebugInfo "Yes (/DEBUG)"
diff --git a/mp/src/vpc_scripts/source_dll_win32_release.vpc b/mp/src/vpc_scripts/source_dll_win32_release.vpc
index 916045f5..880e5efc 100644
--- a/mp/src/vpc_scripts/source_dll_win32_release.vpc
+++ b/mp/src/vpc_scripts/source_dll_win32_release.vpc
@@ -82,7 +82,7 @@ $Configuration "Release"
// Preprocessor
$PreprocessorDefinitions "$BASE;WIN32;_WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_ALLOW_RUNTIME_LIBRARY_MISMATCH;_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_ALLOW_MSC_VER_MISMATCH;%(PreprocessorDefinitions)"
- $PreprocessorDefinitions "$BASE;RELEASE_ASSERTS" [$RELEASEASSERTS]
+ $PreprocessorDefinitions "$BASE;RELEASEASSERTS" [$RELEASEASSERTS]
$IgnoreStandardIncludePath
$GeneratePreprocessedFile
$KeepComments
@@ -143,7 +143,7 @@ $Configuration "Release"
$AdditionalOptions "/Zm200"
// Enable extra debugging information.
- $AdditionalOptions "$BASE /d2Zi+" [$VS2010]
+ $AdditionalOptions "$BASE /d2Zi+"
$AdditionalOptions "$BASE /Oy-" [$NOFPO]
}
diff --git a/mp/src/vpc_scripts/source_exe_base.vpc b/mp/src/vpc_scripts/source_exe_base.vpc
index e19d07f8..c6ffafaa 100644
--- a/mp/src/vpc_scripts/source_exe_base.vpc
+++ b/mp/src/vpc_scripts/source_exe_base.vpc
@@ -15,6 +15,6 @@ $Configuration
$PreprocessorDefinitions "$BASE;DEV_BUILD" [!$PUBLISH]
$PreprocessorDefinitions "$BASE;_PROFILE" [$PROFILE && !$RETAIL]
$PreprocessorDefinitions "$BASE;RETAIL_ASSERTS" [$RETAIL && $RETAILASSERTS]
- $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" [$NOFPO || $VS2010]
+ $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" // This is now always true.
}
} \ No newline at end of file
diff --git a/mp/src/vpc_scripts/source_exe_con_base.vpc b/mp/src/vpc_scripts/source_exe_con_base.vpc
index 04c3f4e1..f1521ecd 100644
--- a/mp/src/vpc_scripts/source_exe_con_base.vpc
+++ b/mp/src/vpc_scripts/source_exe_con_base.vpc
@@ -13,6 +13,6 @@ $Configuration
$PreprocessorDefinitions "$BASE;DEV_BUILD" [!$PUBLISH]
$PreprocessorDefinitions "$BASE;_PROFILE" [$PROFILE && !$RETAIL]
$PreprocessorDefinitions "$BASE;RETAIL_ASSERTS" [$RETAIL && $RETAILASSERTS]
- $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" [$NOFPO || $VS2010]
+ $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" // This is now always true.
}
}
diff --git a/mp/src/vpc_scripts/source_exe_con_win32_base.vpc b/mp/src/vpc_scripts/source_exe_con_win32_base.vpc
index 3dfa9e29..bd9736e6 100644
--- a/mp/src/vpc_scripts/source_exe_con_win32_base.vpc
+++ b/mp/src/vpc_scripts/source_exe_con_win32_base.vpc
@@ -14,7 +14,7 @@ $Include "$SRCDIR\vpc_scripts\source_exe_win_win32_base.vpc"
$Configuration
{
- $General [$VS2010]
+ $General
{
$TargetName "$OUTBINNAME"
}
diff --git a/mp/src/vpc_scripts/source_exe_win_win32_base.vpc b/mp/src/vpc_scripts/source_exe_win_win32_base.vpc
index 22b3896f..47ce40fd 100644
--- a/mp/src/vpc_scripts/source_exe_win_win32_base.vpc
+++ b/mp/src/vpc_scripts/source_exe_win_win32_base.vpc
@@ -24,7 +24,7 @@ $IgnoreRedundancyWarning "ON"
// Common Configuration
$Configuration
{
- $General [$VS2010]
+ $General
{
$TargetName "$OUTBINNAME"
}
@@ -53,6 +53,7 @@ $Configuration
// Suppress this pointless warning using the undocumented /ignore linker switch
// schemalib.lib(schemaclassinfo.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
$AdditionalOptions "$BASE /ignore:4221"
+ $AdditionalOptions "$BASE $SRCDIR\lib\public\ftol3.obj" [$VS2013 && $WIN32 && !$DISABLE_FTOL3_OVERRIDE && !$SOURCESDK] // Work around CRT bug https://connect.microsoft.com/VisualStudio/feedback/details/806362/vc12-pollutes-the-floating-point-stack-when-casting-infinity-nan-to-unsigned-long#
}
$PreBuildEvent
@@ -100,8 +101,8 @@ $Project
}
// Implement __imp__EncodePointer and __imp__DecodePointer so that we can run on XP SP1
- // when building with VS 2010.
- $File "$SRCDIR\public\tier0\pointeroverride.asm" [$WIN32 && $VS2010]
+ // when building with VS 2010 and higher.
+ $File "$SRCDIR\public\tier0\pointeroverride.asm" [$WIN32]
{
$Configuration
{
diff --git a/mp/src/vpc_scripts/source_exe_win_win32_debug.vpc b/mp/src/vpc_scripts/source_exe_win_win32_debug.vpc
index 302d80e9..399d1761 100644
--- a/mp/src/vpc_scripts/source_exe_win_win32_debug.vpc
+++ b/mp/src/vpc_scripts/source_exe_win_win32_debug.vpc
@@ -246,7 +246,7 @@ $Configuration "Debug"
$UseFAT32WorkAround
// Input And Output
- $AdditionalManifestFiles "$SRCDIR\public\windows_default.manifest" [$VS2010 && !$SOURCESDK]
+ $AdditionalManifestFiles "$SRCDIR\public\windows_default.manifest" [!$SOURCESDK]
$InputResourceManifests
$EmbedManifest
$OutputManifestFile
diff --git a/mp/src/vpc_scripts/source_exe_win_win32_release.vpc b/mp/src/vpc_scripts/source_exe_win_win32_release.vpc
index d3370146..6cb5c335 100644
--- a/mp/src/vpc_scripts/source_exe_win_win32_release.vpc
+++ b/mp/src/vpc_scripts/source_exe_win_win32_release.vpc
@@ -142,7 +142,7 @@ $Configuration "Release"
$ErrorReporting "Prompt Immediately (/errorReport:prompt)"
// Enable extra debugging information.
- $AdditionalOptions "$BASE /d2Zi+" [$VS2010]
+ $AdditionalOptions "$BASE /d2Zi+"
// Command Line
$AdditionalOptions "$BASE /Oy-" [$NOFPO]
}
@@ -264,7 +264,7 @@ $Configuration "Release"
$UseFAT32WorkAround
// Input And Output
- $AdditionalManifestFiles "$SRCDIR\public\windows_default.manifest" [$VS2010 && !$SOURCESDK]
+ $AdditionalManifestFiles "$SRCDIR\public\windows_default.manifest" [!$SOURCESDK]
$InputResourceManifests
$EmbedManifest
$OutputManifestFile
diff --git a/mp/src/vpc_scripts/source_lib_base.vpc b/mp/src/vpc_scripts/source_lib_base.vpc
index 07014b44..851609eb 100644
--- a/mp/src/vpc_scripts/source_lib_base.vpc
+++ b/mp/src/vpc_scripts/source_lib_base.vpc
@@ -17,6 +17,6 @@ $Configuration
$PreprocessorDefinitions "$BASE;DEV_BUILD" [!$PUBLISH]
$PreprocessorDefinitions "$BASE;_PROFILE" [$PROFILE && !$RETAIL]
$PreprocessorDefinitions "$BASE;RETAIL_ASSERTS" [$RETAIL && $RETAILASSERTS]
- $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" [$NOFPO || $VS2010]
+ $PreprocessorDefinitions "$BASE;FRAME_POINTER_OMISSION_DISABLED" // This is now always true.
}
}
diff --git a/mp/src/vpc_scripts/source_lib_win32_base.vpc b/mp/src/vpc_scripts/source_lib_win32_base.vpc
index c5f8e0b5..02caa800 100644
--- a/mp/src/vpc_scripts/source_lib_win32_base.vpc
+++ b/mp/src/vpc_scripts/source_lib_win32_base.vpc
@@ -22,7 +22,7 @@ $IgnoreRedundancyWarning "ON"
// Common Configuration
$Configuration
{
- $General [$VS2010]
+ $General
{
$TargetName "$OUTLIBNAME"
}
diff --git a/mp/src/vpc_scripts/source_lib_win32_debug.vpc b/mp/src/vpc_scripts/source_lib_win32_debug.vpc
index cefc44f4..d179ecef 100644
--- a/mp/src/vpc_scripts/source_lib_win32_debug.vpc
+++ b/mp/src/vpc_scripts/source_lib_win32_debug.vpc
@@ -23,8 +23,7 @@ $Configuration "Debug"
$General
{
// General
- $OutputDirectory ".\Debug$_SUBDIRSUFFIX" [!$VS2010]
- $OutputDirectory "$OUTLIBDIR" [$VS2010]
+ $OutputDirectory "$OUTLIBDIR"
$IntermediateDirectory ".\Debug$_SUBDIRSUFFIX"
$ExtensionsToDeleteOnClean
$BuildLogFile
diff --git a/mp/src/vpc_scripts/source_lib_win32_release.vpc b/mp/src/vpc_scripts/source_lib_win32_release.vpc
index b6f54059..cbfe4cab 100644
--- a/mp/src/vpc_scripts/source_lib_win32_release.vpc
+++ b/mp/src/vpc_scripts/source_lib_win32_release.vpc
@@ -27,10 +27,7 @@ $Configuration "Release"
$General
{
// General
- $OutputDirectory ".\Release$_SUBDIRSUFFIX" [!$VS2010 && !$RETAIL && !$PROFILE]
- $OutputDirectory ".\Retail$_SUBDIRSUFFIX" [!$VS2010 && $RETAIL]
- $OutputDirectory ".\Profile$_SUBDIRSUFFIX" [!$VS2010 && !$RETAIL && $PROFILE]
- $OutputDirectory "$OUTLIBDIR" [$VS2010]
+ $OutputDirectory "$OUTLIBDIR"
$IntermediateDirectory ".\Release$_SUBDIRSUFFIX" [!$RETAIL && !$PROFILE]
$IntermediateDirectory ".\Retail$_SUBDIRSUFFIX" [$RETAIL]
$IntermediateDirectory ".\Profile$_SUBDIRSUFFIX" [!$RETAIL && $PROFILE]
@@ -83,7 +80,7 @@ $Configuration "Release"
// Preprocessor
$PreprocessorDefinitions "$BASE;WIN32;_WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_ALLOW_RUNTIME_LIBRARY_MISMATCH;_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_ALLOW_MSC_VER_MISMATCH;%(PreprocessorDefinitions)"
- $PreprocessorDefinitions "$BASE;RELEASE_ASSERTS" [$RELEASEASSERTS]
+ $PreprocessorDefinitions "$BASE;RELEASEASSERTS" [$RELEASEASSERTS]
$IgnoreStandardIncludePath
$GeneratePreprocessedFile
$KeepComments
@@ -143,7 +140,7 @@ $Configuration "Release"
$ErrorReporting "Prompt Immediately (/errorReport:prompt)"
// Enable extra debugging information.
- $AdditionalOptions "/d2Zi+" [$VS2010]
+ $AdditionalOptions "/d2Zi+"
$AdditionalOptions "$BASE /Oy-" [$NOFPO]
}
diff --git a/mp/src/vpc_scripts/source_win32_analyze.vpc b/mp/src/vpc_scripts/source_win32_analyze.vpc
new file mode 100644
index 00000000..ceb6e0b0
--- /dev/null
+++ b/mp/src/vpc_scripts/source_win32_analyze.vpc
@@ -0,0 +1,65 @@
+// /analyze specific settings. Placed here so that they can be changed without triggering rebuilds of the entire world.
+
+$Configuration
+{
+ $Compiler
+ {
+ // When using /analyze (triggered with /define:ANALYZE on the vpc command line) we want to forcibly disable lots
+ // of warnings.
+ // warning C6308: 'realloc' might return null pointer, cause the original memory block to be leaked
+ // warning C6255: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
+ // warning C6387: 'argument 1' might be '0': this does not adhere to the specification for the function 'GetProcAddress'
+ // warning C6309: Argument '1' is null: this does not adhere to function specification of 'GetProcAddress'
+ // warning C6011: Dereferencing NULL pointer 'm_ppTestCases'
+ // warning C6211: Leaking memory 'newKeyValue' due to an exception. Consider using a local catch block to clean up memory
+ // These warnings are because /analyze doesn't like our use of constants, especially things like IsPC()
+ // warning C6326: Potential comparison of a constant with another constant
+ // warning C6239: (<non-zero constant> && <expression>) always evaluates to the result of <expression>. Did you intend to use the bitwise-and operator?
+ // warning C6285: (<non-zero constant> || <non-zero constant>) is always a non-zero constant. Did you intend to use the bitwise-and operator?
+ // warning C6237: (<zero> && <expression>) is always zero. <expression> is never evaluated and might have side effects
+ // warning C6235: (<non-zero constant> || <expression>) is always a non-zero constant
+ // warning C6240: (<expression> && <non-zero constant>) always evaluates to the result of <expression>. Did you intend to use the bitwise-and operator?
+ // These warnings aren't really important:
+ // warning C6323: Use of arithmetic operator on Boolean type(s)
+ // /analyze doesn't like GCOMPILER_ASSERT's implementation of compile-time asserts
+ // warning C6326: Potential comparison of a constant with another constant
+ // warning C6335: Leaking process information handle 'pi.hThread'
+ // warning C6320: Exception-filter expression is the constant EXCEPTION_EXECUTE_HANDLER. This might mask exceptions that were not intended to be handled
+ // warning C6250: Calling 'VirtualFree' without the MEM_RELEASE flag might free memory but not address descriptors (VADs). This causes address space leaks
+ // warning C6384: Dividing sizeof a pointer by another value
+ // warning C6318: Ill-defined __try/__except: use of the constant EXCEPTION_CONTINUE_SEARCH -- bogus
+ // warning C6322: Empty _except block
+
+ // Set the stack size threshold to 100,000 to avoid noisy warnings on functions with modest stack usage
+ // Note that /analyze for VS 2010 only works with the 32-bit compiler, but for VS 2012 it works on 64-bit
+ // as well.
+ $DisableSpecificWarnings "$BASE;6308;6255;6387;6309;6011;6211;6326;6239;6285;6237;6235;6240;6323;6326;6335;6320;6250;6384;6318;6322" [$ANALYZE]
+ // See http://randomascii.wordpress.com/2011/10/04/analyzecommand-line-options/ for details on these options.
+ // /analyze:only may result in fewer warnings being reported, but the warnings it misses should show up in the regular build.
+ $AdditionalOptions "$BASE /analyze /analyze:only /analyze:stacksize100000" [$ANALYZE]
+
+ // Specify /define:ALLOWSHADOWING to suppress variable shadowing warnings
+ $DisableSpecificWarnings "$BASE;6244;6246" [$ANALYZE && $ALLOWSHADOWING]
+
+ // New warnings in VS 2012 that we want to ignore.
+ // warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition
+ // warning C6014: Leaking memory 'pThinkParams'.
+ // warning C28159: Consider using 'GetTickCount64' instead of 'GetTickCount'. Reason: GetTickCount overflows roughly every 49 days.
+ // warning C28182: Dereferencing NULL pointer. 'pPropMesh' contains the same NULL value as '(CMesh *)=(pPropMesh)' did.
+ // warning C28183: 'entropy->ac_count_ptrs[actbl]' could be '0', and is a copy of the value found in 'entropy->dc_count_ptrs[dctbl]': this does not adhere to the specification for the function 'memset'.
+ // warning C28197: Possibly leaking memory 'pInfo'.
+ // warning C28198: Possibly leaking memory 'kvFrame1' due to an exception. Is a local catch block needed to clean up memory?
+ // warning C28204: 'QueryInterface' : Only one of this overload and the one at c:\program files (x86)\windows kits\8.0\include\um\unknwnbase.h(114) are annotated for _Param_(2): both or neither must be annotated.
+ // warning C28247: Model file annotation for function '_vsnprintf': annotation on _Param_(1)/SAL_post, 'RequiresZeroTermination' duplicates header file annotation 'SAL_nullTerminated'. Remove the duplicated annotations from the model file. (Header: c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdio.h(349).)
+ // warning C28251: Inconsistent annotation for 'WinMain': this instance has no annotations. See c:\program files (x86)\windows kits\8.0\include\um\winbase.h(2286).
+ // warning C28301: No annotations for first declaration of 'InitializeCriticalSection'. See d:\clients\tf3\staging\src\public\tier0\threadtools.h(1373).
+ // warning C28195: The function was declared as acquiring memory in 'return' and exited without doing so.
+ // warning C6340: Mismatch on sign: 'unsigned short' passed as parameter '6' when some signed type is required in call to 'V_snprintf'.
+ // This warning only applies to Windows XP in low-memory situations:
+ // warning C28125: The function 'InitializeCriticalSection' must be called from within a try\except block
+ // warning C28160: Error annotation: Calling VirtualFreeEx without the MEM_RELEASE flag frees memory but not address descriptors (VADs); results in address space leaks.
+ // warning C6248: Setting a SECURITY_DESCRIPTOR's DACL to NULL will result in an unprotected object.
+ // warning C6102: Using value from failed function call
+ $DisableSpecificWarnings "$BASE;6014;28159;28182;28183;28197;28198;28204;28247;28251;28301;28195;6340;28125;28160;6248;6102" [$ANALYZE && ($VS2012 || $VS2013)]
+ }
+}
diff --git a/mp/src/vpc_scripts/source_win32_base.vpc b/mp/src/vpc_scripts/source_win32_base.vpc
index 3749a07a..245366f4 100644
--- a/mp/src/vpc_scripts/source_win32_base.vpc
+++ b/mp/src/vpc_scripts/source_win32_base.vpc
@@ -1,3 +1,8 @@
+// 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]
+
$Configuration
{
$General
@@ -27,45 +32,23 @@ $Configuration
// warning C4316: object allocated on the heap may not be aligned 16
$DisableSpecificWarnings "$BASE;4316" [$VS2013]
- // When using /analyze (triggered with /define:ANALYZE on the vpc command line) we want to forcibly disable lots
- // of warnings (also disabled in platform.h but not everybody includes that).
- // See platform.h for the list of warnings with explanations.
- // warning C6318: Ill-defined __try/__except: use of the constant EXCEPTION_CONTINUE_SEARCH -- bogus
- // warning C6322: Empty _except block
- // Set the stack size threshold to 100,000 to avoid noisy warnings on functions with modest stack usage
- // Note that /analyze for VS 2010 only works with the 32-bit compiler, but for VS 2012 it works on 64-bit
- // as well.
- $DisableSpecificWarnings "$BASE;6308;6255;6387;6309;6011;6211;6031;6326;6239;6285;6237;6235;6240;6323;6326;6335;6320;6250;6384;6318;6322" [$ANALYZE]
- // See http://randomascii.wordpress.com/2011/10/04/analyzecommand-line-options/ for details on these options.
- // /analyze:only may result in fewer warnings being reported, but the warnings it misses should show up in the regular build.
- $AdditionalOptions "$BASE /analyze /analyze:only /analyze:stacksize100000" [$ANALYZE]
-
- // Specify /define:ALLOWSHADOWING to suppress variable shadowing warnings
- $DisableSpecificWarnings "$BASE;6244;6246" [$ANALYZE && $ALLOWSHADOWING]
-
- // New warnings in VS 2012 that we want to ignore.
- // warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition
- // warning C6014: Leaking memory 'pThinkParams'.
- // warning C28159: Consider using 'GetTickCount64' instead of 'GetTickCount'. Reason: GetTickCount overflows roughly every 49 days.
- // warning C28182: Dereferencing NULL pointer. 'pPropMesh' contains the same NULL value as '(CMesh *)=(pPropMesh)' did.
- // warning C28183: 'entropy->ac_count_ptrs[actbl]' could be '0', and is a copy of the value found in 'entropy->dc_count_ptrs[dctbl]': this does not adhere to the specification for the function 'memset'.
- // warning C28197: Possibly leaking memory 'pInfo'.
- // warning C28198: Possibly leaking memory 'kvFrame1' due to an exception. Is a local catch block needed to clean up memory?
- // warning C28204: 'QueryInterface' : Only one of this overload and the one at c:\program files (x86)\windows kits\8.0\include\um\unknwnbase.h(114) are annotated for _Param_(2): both or neither must be annotated.
- // warning C28247: Model file annotation for function '_vsnprintf': annotation on _Param_(1)/SAL_post, 'RequiresZeroTermination' duplicates header file annotation 'SAL_nullTerminated'. Remove the duplicated annotations from the model file. (Header: c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdio.h(349).)
- // warning C28251: Inconsistent annotation for 'WinMain': this instance has no annotations. See c:\program files (x86)\windows kits\8.0\include\um\winbase.h(2286).
- // warning C28301: No annotations for first declaration of 'InitializeCriticalSection'. See d:\clients\tf3\staging\src\public\tier0\threadtools.h(1373).
- // warning C28195: The function was declared as acquiring memory in 'return' and exited without doing so.
- // warning C6340: Mismatch on sign: 'unsigned short' passed as parameter '6' when some signed type is required in call to 'V_snprintf'.
- // This warning only applies to Windows XP in low-memory situations:
- // warning C28125: The function 'InitializeCriticalSection' must be called from within a try\except block
- // warning C28160: Error annotation: Calling VirtualFreeEx without the MEM_RELEASE flag frees memory but not address descriptors (VADs); results in address space leaks.
- // warning C6248: Setting a SECURITY_DESCRIPTOR's DACL to NULL will result in an unprotected object.
- // warning C6102: Using value from failed function call
- $DisableSpecificWarnings "$BASE;6014;28159;28182;28183;28197;28198;28204;28247;28251;28301;28195;6340;28125;28160;6248;6102" [$ANALYZE && ($VS2012 || $VS2013)]
+ // 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" [$VS2013]
}
}