Browse Source

Added _DEBUG, NDEBUG defines for release/debug builds.

Branimir Karadžić 9 years ago
parent
commit
223d9f7e00
1 changed files with 11 additions and 5 deletions
  1. 11 5
      scripts/toolchain.lua

+ 11 - 5
scripts/toolchain.lua

@@ -532,21 +532,27 @@ function toolchain(_buildDir, _libDir)
 		"__STDC_CONSTANT_MACROS",
 		"__STDC_CONSTANT_MACROS",
 	}
 	}
 
 
-	configuration { "qbs" }
-		flags {
-			"ExtraWarnings",
-		}
-
 	configuration { "Debug" }
 	configuration { "Debug" }
 		targetsuffix "Debug"
 		targetsuffix "Debug"
+		defines {
+			"_DEBUG",
+		}
 
 
 	configuration { "Release" }
 	configuration { "Release" }
 		flags {
 		flags {
 			"NoBufferSecurityCheck",
 			"NoBufferSecurityCheck",
 			"OptimizeSpeed",
 			"OptimizeSpeed",
 		}
 		}
+		defines {
+			"NDEBUG",
+		}
 		targetsuffix "Release"
 		targetsuffix "Release"
 
 
+	configuration { "qbs" }
+		flags {
+			"ExtraWarnings",
+		}
+
 	configuration { "vs*", "x32" }
 	configuration { "vs*", "x32" }
 		flags {
 		flags {
 			"EnableSSE2",
 			"EnableSSE2",