From 040766fa4096481d2b906a24445a77bc5e718215 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 19 May 2016 13:57:50 +0200 Subject: [PATCH] Keep the debugging symbols when building in release mode. --- prepare.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/prepare.py b/prepare.py index 36837a5d9..bd7d57294 100755 --- a/prepare.py +++ b/prepare.py @@ -319,7 +319,7 @@ def list_features_with_args(debug, additional_args): option_regex = re.compile("ENABLE_(.*):(.*)=(.*)") options = {} ended = True - build_type = 'Debug' if debug else 'Release' + build_type = 'Debug' if debug else 'RelWithDebInfo' for line in Popen(tmptarget.cmake_command(build_type, False, True, additional_args, verbose=False), cwd=tmpdir, shell=False, stdout=PIPE).stdout.readlines(): @@ -478,7 +478,10 @@ def main(argv=None): if args.clean: target.clean() else: - retcode = prepare.run(target, args.debug, False, args.list_cmake_variables, args.force, additional_args) + build_type = 'RelWithDebInfo' + if args.debug: + build_type = 'Debug' + retcode = prepare.run(target, build_type, False, args.list_cmake_variables, args.force, additional_args) if retcode != 0: return retcode