From a96a94ac79311dd9b4892f335aa03e9b6f4666da Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 26 Mar 2021 13:53:44 +0100 Subject: GitHub Actions: Build without PCH ccache is not working very well when pch is enabled. Change-Id: I2922d2261bf4040ccd2837b2cc5c505ec2881207 Reviewed-by: Alessandro Portale --- scripts/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build.py b/scripts/build.py index 71fe262b30..d779a33d44 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -95,6 +95,8 @@ def get_arguments(): action='store_true', default=False) parser.add_argument('--with-tests', help='Enable building of tests', action='store_true', default=False) + parser.add_argument('--with-pch', help='Enable building with PCH', + action='store_true', default=False) parser.add_argument('--add-path', help='Prepends a CMAKE_PREFIX_PATH to the build', action='append', dest='prefix_paths', default=[]) parser.add_argument('--add-module-path', help='Prepends a CMAKE_MODULE_PATH to the build', @@ -139,6 +141,10 @@ def common_cmake_arguments(args): if python_library: cmake_args += ['-DPYTHON_LIBRARY=' + python_library[0], '-DPYTHON_INCLUDE_DIR=' + os.path.join(args.python_path, 'include')] + + pch_option = 'ON' if args.with_pch else 'OFF' + cmake_args += ['-DBUILD_WITH_PCH=' + pch_option] + return cmake_args def build_qtcreator(args, paths): -- cgit v1.2.1