[DEV] set the NDEBUG and the DEBUG flag and set -03 compilation in release

This commit is contained in:
Edouard DUPIN 2014-06-04 09:26:49 +02:00
parent 5c972caccd
commit d4fbbaff70
2 changed files with 10 additions and 5 deletions

View File

@ -143,7 +143,7 @@ class Module:
self.flags_cc,
self.export_flags_mm,
self.export_flags_cc,
"-c -MMD -MP -g",
"-c -MMD -MP",
"-x objective-c++",
file_src])
# check the dependency for this file :
@ -178,7 +178,7 @@ class Module:
self.flags_cc,
self.export_flags_m,
self.export_flags_cc,
"-c -MMD -MP -g",
"-c -MMD -MP",
"-x objective-c",
file_src])
# check the dependency for this file :
@ -213,7 +213,7 @@ class Module:
self.flags_cc,
self.export_flags_xx,
self.export_flags_cc,
" -c -MMD -MP -g ",
" -c -MMD -MP",
file_src])
# check the dependency for this file :
if False==dependency.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine):
@ -243,7 +243,7 @@ class Module:
depancy.flags_cc,
self.flags_cc,
self.export_flags_cc,
" -c -MMD -MP -g ",
" -c -MMD -MP",
file_src])
# check the dependency for this file :

View File

@ -65,10 +65,15 @@ class Target:
self.folder_arch="/" + self.name
if "debug"==debugMode:
if "debug" == debugMode:
self.buildMode = "debug"
self.global_flags_cc.append("-g")
self.global_flags_cc.append("-DDEBUG")
self.global_flags_cc.append("-O0")
else:
self.buildMode = "release"
self.global_flags_cc.append("-DNDEBUG")
self.global_flags_cc.append("-O3")
self.folder_out="/out" + self.folder_arch + "/" + self.buildMode
self.folder_final="/final/" + typeCompilator
self.folder_staging="/staging/" + typeCompilator