summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-11-12 16:08:06 +0100
committerCristian Adam <cristian.adam@qt.io>2020-11-12 16:22:19 +0000
commit093d5f5ab10d04d928f10a042d27ad6025ccacde (patch)
treeeaefc9022b2c89b0a01a407ba49c7c19d3256571 /scripts
parent49230c21221e475c261bf30e30f1a18d92a15f90 (diff)
downloadqt-creator-093d5f5ab10d04d928f10a042d27ad6025ccacde.tar.gz
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 b1640074e3630fff8d510c0f96efdfcfeedb93a1 Change-Id: Ibba6e60d4e9b2eee24e789bfd28bddffb1e782f6 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.py6
-rwxr-xr-xscripts/build_plugin.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/scripts/build.py b/scripts/build.py
index fb7f5b0a22..5360903371 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -54,7 +54,8 @@ def get_arguments():
parser.add_argument('--build', help='path that should be used for building', required=True)
parser.add_argument('--qt-path', help='Path to Qt', required=True)
- 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')
# clang codemodel
parser.add_argument('--llvm-path', help='Path to LLVM installation for Clang code model',
@@ -113,13 +114,12 @@ def build_qtcreator(args, paths):
if paths.elfutils:
prefix_paths += [paths.elfutils]
prefix_paths = [common.to_posix_path(fp) for fp in prefix_paths]
- build_type = 'Debug' if args.debug else 'RelWithDebInfo'
with_docs_str = 'OFF' if args.no_docs else 'ON'
build_date_option = 'OFF' if args.no_build_date else 'ON'
test_option = 'ON' if args.with_tests else 'OFF'
cmake_args = ['cmake',
'-DCMAKE_PREFIX_PATH=' + ';'.join(prefix_paths),
- '-DCMAKE_BUILD_TYPE=' + build_type,
+ '-DCMAKE_BUILD_TYPE=' + args.build_type,
'-DSHOW_BUILD_DATE=' + build_date_option,
'-DWITH_DOCS=' + with_docs_str,
'-DBUILD_DEVELOPER_DOCS=' + with_docs_str,
diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py
index f8d920dca6..a8d40424a9 100755
--- a/scripts/build_plugin.py
+++ b/scripts/build_plugin.py
@@ -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']