add 'developer' option to decouple cheats etc. from build type
developer=true --> DEBUG macro is set, regardless of build type developer=false --> DEBUG macro is not set, regardless of build type developer=auto --> DEBUG macro is set only on debug* build types; this matches old behavior and is the default.
This commit is contained in:
parent
fa802dbd94
commit
9af300d4df
5 changed files with 13 additions and 4 deletions
|
@ -196,8 +196,9 @@ else
|
|||
endif
|
||||
|
||||
is_debug_build = get_option('buildtype').startswith('debug')
|
||||
is_developer_build = (get_option('developer') == 'auto' ? is_debug_build : get_option('developer') == 'true')
|
||||
|
||||
config.set('TAISEI_BUILDCONF_DEBUG', is_debug_build)
|
||||
config.set('TAISEI_BUILDCONF_DEVELOPER', is_developer_build)
|
||||
config.set('TAISEI_BUILDCONF_LOG_ENABLE_BACKTRACE', is_debug_build and have_backtrace)
|
||||
config.set('TAISEI_BUILDCONF_LOG_FATAL_MSGBOX', host_machine.system() == 'windows' or host_machine.system() == 'darwin')
|
||||
config.set('TAISEI_BUILDCONF_DEBUG_OPENGL', get_option('debug_opengl'))
|
||||
|
|
|
@ -4,6 +4,13 @@ option(
|
|||
description : 'Overrides the version string when not building in a git repository'
|
||||
)
|
||||
|
||||
option(
|
||||
'developer',
|
||||
type : 'combo',
|
||||
choices : ['auto', 'true', 'false'],
|
||||
description : 'Make a "developer" build with cheats and extra debugging features'
|
||||
)
|
||||
|
||||
option(
|
||||
'enable_audio',
|
||||
type : 'combo',
|
||||
|
|
|
@ -14,7 +14,7 @@ stages_src = files(
|
|||
'stage6_events.c',
|
||||
)
|
||||
|
||||
if is_debug_build
|
||||
if is_developer_build
|
||||
stages_src += files(
|
||||
'dpstest.c',
|
||||
)
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
#include "build_config.h"
|
||||
#include "util/compat.h"
|
||||
|
||||
#ifdef TAISEI_BUILDCONF_DEBUG
|
||||
#ifdef TAISEI_BUILDCONF_DEVELOPER
|
||||
// TODO: maybe rename this
|
||||
#define DEBUG 1
|
||||
#endif
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ sse42_src += files(
|
|||
'sse42.c',
|
||||
)
|
||||
|
||||
if is_debug_build
|
||||
if is_developer_build
|
||||
util_src += files('debug.c')
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue