Browse Source

Add compiler flags for windows

This adds MSVC compiler flags to enable the DEBUG/NDEBUG defines, enable exceptions, turn on optimizations for Release builds, and link to the correct runtime library
Richy HBM 8 years ago
parent
commit
2d54c15c30
1 changed files with 4 additions and 0 deletions
  1. 4 0
      SConstruct

+ 4 - 0
SConstruct

@@ -40,6 +40,10 @@ if platform == "linux":
 env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core'])
 env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core'])
 
 
 if platform == "windows":
 if platform == "windows":
+    if target == "debug":
+        env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '/MDd'])
+    else:
+        env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '/MD'])
     env.Append(LIBS=[godot_name])
     env.Append(LIBS=[godot_name])
     env.Append(LIBPATH=[godot_lib_path])
     env.Append(LIBPATH=[godot_lib_path])