Build in release mode on GitHub

Add option to build scripts to override build type, so it can be
freely chosen.
Build in release mode on GitHub - RelWithDebInfo was too big.

Amends b1640074e3

Change-Id: Ibba6e60d4e9b2eee24e789bfd28bddffb1e782f6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Eike Ziller
2020-11-12 16:08:06 +01:00
committed by Cristian Adam
parent 49230c2122
commit 093d5f5ab1
3 changed files with 7 additions and 6 deletions

View File

@@ -57,7 +57,8 @@ def get_arguments():
action='store_true', default=False)
parser.add_argument('--deploy', help='Installs the "Dependencies" component of the plugin.',
action='store_true', default=False)
parser.add_argument('--debug', help='Enable debug builds', action='store_true', default=False)
parser.add_argument('--build-type', help='Build type to pass to CMake (defaults to RelWithDebInfo)',
default='RelWithDebInfo')
return parser.parse_args()
def build(args, paths):
@@ -67,10 +68,9 @@ def build(args, paths):
os.makedirs(paths.result)
prefix_paths = [os.path.abspath(fp) for fp in args.prefix_paths] + [paths.qt_creator, paths.qt]
prefix_paths = [common.to_posix_path(fp) for fp in prefix_paths]
build_type = 'Debug' if args.debug else 'RelWithDebInfo'
cmake_args = ['cmake',
'-DCMAKE_PREFIX_PATH=' + ';'.join(prefix_paths),
'-DCMAKE_BUILD_TYPE=' + build_type,
'-DCMAKE_BUILD_TYPE=' + args.build_type,
'-DCMAKE_INSTALL_PREFIX=' + common.to_posix_path(paths.install),
'-G', 'Ninja']