summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/functions.prf
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-03-07 14:44:03 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-07 18:19:41 +0100
commitc845b8438b65e6735c8beb0927ad0527cb1b0611 (patch)
tree75dacee930f9ada017bd9d26c5e91186931e3302 /tools/qmake/mkspecs/features/functions.prf
parent7795807dc6eb757f32971d12fe7c9514350b4636 (diff)
Do not use the system ninja
Always bootstrap and use the bundled ninja to avoid incompatibilities between our bundled gyp and the system ninja, which might be quite old. This patch also removes the ninja location caching, as updating the cache would trigger a re-run of qmake and gyp on all the project, while the benefit of using the cache in this case are low. Change-Id: I843cbe20e1153caecbda00ab3d45a34d560b2423 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf21
1 files changed, 7 insertions, 14 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 0814e8b4f..4dcd8ed18 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -84,23 +84,16 @@ defineReplace(which) {
}
defineReplace(findOrBuildNinja) {
- !isEmpty(CACHED_NINJA_EXECUTABLE):exists($$CACHED_NINJA_EXECUTABLE): return($$CACHED_NINJA_EXECUTABLE)
- out = $$which(ninja)
- # Try to be smart about it if we know where the chromium sources are located
- !exists($$out) {
git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
# Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used)
isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium"
- win32: out = $$system_path($$absolute_path("$$git_chromium_src_dir/../ninja/ninja.exe", "$$QTWEBENGINE_ROOT"))
- else: out = $$absolute_path("$$git_chromium_src_dir/../ninja/ninja", "$$QTWEBENGINE_ROOT")
- # If we still did not find ninja, then we bootstrap it.
+
+ out = $$absolute_path("$$git_chromium_src_dir/../ninja/ninja", "$$QTWEBENGINE_ROOT")
+ win32: out = $$system_path($${out}.exe)
+
+ # If we did not find ninja, then we bootstrap it.
!exists($$out) {
- message("bootstrapping ninja...")
- ninjadir = $$dirname(out)
- system("python $$ninjadir/bootstrap.py")
+ system("python $$dirname(out)/bootstrap.py")
}
- }
- message("using $$out")
- cache(CACHED_NINJA_EXECUTABLE, set, out)
- return($$out)
+ return($$out)
}