diff options
-rwxr-xr-x | scripts/build.py | 6 |
1 files changed, 6 insertions, 0 deletions
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): |