Skip to content

Commit

Permalink
Add release_debug target; add debug symbols to debug target.
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuma committed Jun 19, 2020
1 parent d259a25 commit 1060dd5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ opts = Variables(customs, ARGUMENTS)
env = DefaultEnvironment()

# Define our parameters
opts.Add(EnumVariable('target', "Compilation target", 'release', ['d', 'debug', 'r', 'release']))
opts.Add(EnumVariable('target', "Compilation target", 'release', ['d', 'debug', 'r', 'release', 'release_debug']))
opts.Add(EnumVariable('platform', "Compilation platform", 'windows', ['windows', 'x11', 'linux', 'osx']))
opts.AddVariables(
PathVariable('openvr_path', 'The path where the OpenVR repo is located.', 'openvr/'),
Expand Down Expand Up @@ -51,7 +51,11 @@ if env['platform'] == 'windows':

env.Append(CCFLAGS = ['-DWIN32', '-D_WIN32', '-D_WINDOWS', '-W3', '-GR', '-D_CRT_SECURE_NO_WARNINGS'])
if env['target'] in ('debug', 'd'):
env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '-MDd'])
env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '-MDd', '-Zi', '-FS'])
env.Append(LINKFLAGS = ['-DEBUG:FULL'])
elif env['target'] in ('release_debug',):
env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '-MD', '-Zi', '-FS'])
env.Append(LINKFLAGS = ['-DEBUG:FULL'])
else:
env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '-MD'])
# untested
Expand Down

0 comments on commit 1060dd5

Please sign in to comment.