summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--GNUmakefile8
-rw-r--r--source/Globals.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 081513c24..3c0da26db 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -39,8 +39,8 @@ ifeq ($(release),1)
################
# release build - fastest run-time, no gdb support
################
-CC_OPTIONS = -s -O3
-CXX_OPTIONS = -s -O3
+CC_OPTIONS = -s -O3 -DNDEBUG
+CXX_OPTIONS = -s -O3 -DNDEBUG
LNK_OPTIONS = -lstdc++ -pthread -O3
BUILDDIR = build/release/
@@ -49,8 +49,8 @@ ifeq ($(profile),1)
################
# profile build - a release build with symbols and profiling engine built in
################
-CC_OPTIONS = -s -ggdb -O3 -pg
-CXX_OPTIONS = -s -ggdb -O3 -pg
+CC_OPTIONS = -s -ggdb -O3 -pg -DNDEBUG
+CXX_OPTIONS = -s -ggdb -O3 -pg -DNDEBUG
LNK_OPTIONS = -lstdc++ -pthread -ggdb -O3 -pg
BUILDDIR = build/profile/
diff --git a/source/Globals.h b/source/Globals.h
index 9ea0825c1..1a4a361ee 100644
--- a/source/Globals.h
+++ b/source/Globals.h
@@ -187,10 +187,10 @@ typedef short Int16;
#define FAST_FLOOR_DIV( x, div ) ( (x) < 0 ? (((int)x / div) - 1) : ((int)x / div) )
// Own version of assert() that writes failed assertions to the log for review
-#ifdef NDEBUG
- #define ASSERT(x) ((void)0)
-#else
+#ifdef _DEBUG
#define ASSERT( x ) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), assert(0), 0 ) )
+#else
+ #define ASSERT(x) ((void)0)
#endif
// Pretty much the same as ASSERT() but stays in Release builds