diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2017-06-29 15:38:30 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-06-30 07:36:08 +0000 |
commit | d10511e0a3f655ab2b1dfebfd9c17ade151a7cfe (patch) | |
tree | 5ec64ccaedca04e702cde087aa950043c1e49974 /Tools/qmake | |
parent | aab669a05f943c587f6acccd94d53a8544170c1c (diff) | |
download | qtwebkit-d10511e0a3f655ab2b1dfebfd9c17ade151a7cfe.tar.gz |
Import WebKit commit 3c9fc2fb47474909f5c30b518d372c854a3ec433
Change-Id: Iccd335ea312d91e826885857fee6d0da3e913b8c
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Tools/qmake')
-rw-r--r-- | Tools/qmake/projects/run_cmake.pro | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/Tools/qmake/projects/run_cmake.pro b/Tools/qmake/projects/run_cmake.pro index 5603ed72e..fcab90880 100644 --- a/Tools/qmake/projects/run_cmake.pro +++ b/Tools/qmake/projects/run_cmake.pro @@ -12,6 +12,8 @@ CONFIG(debug, debug|release) { configuration = Release } +programExistsInPath(ninja): use_ninja = 1 + cmake_build_dir = $$system_quote($$system_path($$ROOT_BUILD_DIR/$$lower($$configuration))) toolchain_file = $$system_quote($$system_path($$ROOT_BUILD_DIR/qmake_toolchain.cmake)) @@ -82,6 +84,8 @@ build_pass|!debug_and_release { } } + !isEmpty(use_ninja): cmake_args += "-G Ninja" + equals(QMAKE_HOST.os, Windows) { if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) { cmake_generator = "NMake Makefiles JOM" @@ -93,10 +97,15 @@ build_pass|!debug_and_release { cmake_generator = "Unix Makefiles" make_command_name = make } - cmake_args += "-G \"$$cmake_generator\"" + isEmpty(use_ninja): cmake_args += "-G \"$$cmake_generator\"" + } else { + make_command_name = make } - !silent: make_args += "VERBOSE=1" + !silent { + make_args += "VERBOSE=1" + ninja_args += "-v" + } # Append additional platform options defined in CMAKE_CONFIG for (config, CMAKE_CONFIG): cmake_args += "-D$$config" @@ -115,7 +124,12 @@ build_pass|!debug_and_release { build_pass:build_all: default_target.target = all else: default_target.target = first - default_target.commands = cd $$cmake_build_dir && $(MAKE) $$make_args + + isEmpty(use_ninja) { + default_target.commands = cd $$cmake_build_dir && $(MAKE) $$make_args + } else { + default_target.commands = cd $$cmake_build_dir && ninja $$ninja_args + } QMAKE_EXTRA_TARGETS += default_target # When debug and release are built at the same time, don't install data files twice @@ -129,3 +143,10 @@ build_pass|!debug_and_release { install_target.commands = $(MAKE) -f $(MAKEFILE) install_impl $$make_args DESTDIR=$(INSTALL_ROOT) QMAKE_EXTRA_TARGETS += install_target } + +!build_pass:debug_and_release:!isEmpty(use_ninja) { + # Special GNU make target for the meta Makefile that ensures that our + # debug_and_release Makefiles won't both run ninja in parallel. + notParallel.target = .NOTPARALLEL + QMAKE_EXTRA_TARGETS += notParallel +} |