Properly set build type: Release or Debug

This commit is contained in:
Nathan Letwory 2010-08-29 19:47:26 +00:00
parent 57aee2ecf4
commit 999bb69c70
1 changed files with 5 additions and 1 deletions

View File

@ -277,12 +277,16 @@ def buildinfo(lenv, build_type):
build_date = time.strftime ("%Y-%m-%d")
build_time = time.strftime ("%H:%M:%S")
build_rev = os.popen('svnversion').read()[:-1] # remove \n
if lenv['BF_DEBUG']:
build_type = "Debug"
else:
build_type = "Release"
obj = []
if lenv['BF_BUILDINFO']:
lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time),
'BUILD_DATE=\'"%s"\''%(build_date),
'BUILD_TYPE=\'"dynamic"\'',
'BUILD_TYPE=\'"%s"\''%(build_type),
'BUILD_REV=\'"%s"\''%(build_rev),
'NAN_BUILDINFO',
'BUILD_PLATFORM=\'"%s %s"\''%(platform.system(), platform.architecture()[0])])