summaryrefslogtreecommitdiff
path: root/common/debug_dll_check.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /common/debug_dll_check.cpp
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'common/debug_dll_check.cpp')
-rw-r--r--common/debug_dll_check.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/debug_dll_check.cpp b/common/debug_dll_check.cpp
new file mode 100644
index 0000000..995e86d
--- /dev/null
+++ b/common/debug_dll_check.cpp
@@ -0,0 +1,16 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Add a specially formatted string to each debug DLL of the form
+// "%DLLNAME%.dll is built debug!". We can search for this string via
+// a Perforce trigger to ensure that debug LIBs are not checked in.
+//
+//=============================================================================//
+
+#if defined(DEBUG) || defined(_DEBUG)
+#include "tier0/platform.h"
+
+#define _DEBUGONLYSTRING(x) #x
+#define DEBUGONLYSTRING(x) _DEBUGONLYSTRING(x)
+DLL_GLOBAL_EXPORT char const *pDebugString = DEBUGONLYSTRING(DLLNAME) ".dll is built debug!";
+
+#endif