diff options
author | Michal Klocek <michal.klocek@qt.io> | 2017-02-03 16:13:50 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2017-02-06 19:32:46 +0000 |
commit | abaede7601ea7426242dc29deb964ab3dd543c0a (patch) | |
tree | f90e83c63f80c8ce58c5c75d0a52d3518e53477c /src/core | |
parent | 79ad6bad373bb5151ba7c3410609a9fee009be58 (diff) |
Refactor release and debug handling
Fix release and debug builds. Refactor ninja and gn
builds as a sub projects, these are only build as release.
Call core_generator and gn_run separately for debug and
release builds.
Change-Id: I638023214cdc98a5101d190486452cc4a1229486
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core_generator.pro | 1 | ||||
-rw-r--r-- | src/core/gn_run.pro | 26 | ||||
-rw-r--r-- | src/core/gyp_run.pro | 4 |
3 files changed, 8 insertions, 23 deletions
diff --git a/src/core/core_generator.pro b/src/core/core_generator.pro index fdd1b8e59..6900468d9 100644 --- a/src/core/core_generator.pro +++ b/src/core/core_generator.pro @@ -1,6 +1,7 @@ use?(gn) { include(core_gn_config.pri) + qtConfig(debug_and_release): CONFIG += debug_and_release } else { include(core_gyp_config.pri) } diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index 534f0c7b3..ec91b469d 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -5,11 +5,9 @@ isQtMinimum(5, 8) { TEMPLATE = aux -build_pass|!debug_and_release { +qtConfig(debug_and_release): CONFIG += debug_and_release build_all - macos: include(config/mac_osx.pri) - linux: include(config/desktop_linux.pri) - isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.) +build_pass|!debug_and_release { ninja_binary = ninja gn_binary = gn @@ -17,13 +15,7 @@ build_pass|!debug_and_release { runninja.target = run_ninja rungn.target = run_gn - !qtConfig(system-ninja) { - ninja_binary = $$shell_quote($$shell_path($$ninjaPath())) - buildninja.target = build_ninja - buildninja.commands = $$buildNinja() - QMAKE_EXTRA_TARGETS += buildninja - runninja.depends = buildninja - } + gn_args = $$gnArgs() CONFIG(release, debug|release): gn_args += is_debug=false @@ -32,13 +24,10 @@ build_pass|!debug_and_release { !qtConfig(system-gn) { gn_binary = $$shell_quote($$shell_path($$gnPath())) - buildgn.target = build_gn - buildgn.commands = $$buildGn($$gn_args) - !qtConfig(system-ninja) { - buildgn.depends = buildninja - rungn.depends = buildninja - } - QMAKE_EXTRA_TARGETS += buildgn + } + + !qtConfig(system-ninja) { + ninja_binary = $$shell_quote($$shell_path($$ninjaPath())) } gn_args = $$shell_quote($$gn_args) @@ -54,7 +43,6 @@ build_pass|!debug_and_release { build_pass:build_all: default_target.target = all else: default_target.target = first default_target.depends = runninja - QMAKE_EXTRA_TARGETS += default_target } else { # Special GNU make target for the meta Makefile that ensures that our debug and release Makefiles won't both run ninja in parallel. diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index fa8f73de4..2c6aa5069 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -159,10 +159,6 @@ build_pass|!debug_and_release { !qtConfig(system-ninja) { ninja_binary = $$shell_quote($$shell_path($$ninjaPath())) - buildninja.target = build_ninja - buildninja.commands = $$buildNinja() - QMAKE_EXTRA_TARGETS += buildninja - runninja.depends = buildninja } runninja.commands = $$ninja_binary \$\(NINJAFLAGS\) -C $$shell_quote($$OUT_PWD/$$getConfigDir()) |