Summary: | [PATCH] Ninja builder is hardwired to use "ninja" executable | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Andrew Stitcher <astitcher> |
Component: | Build tools: Ninja | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | aleixpol, intelfx |
Priority: | NOR | ||
Version: | 4.6.0 | ||
Target Milestone: | 4.6.1 | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/384b2335efc3c69a61914bf3c2874c492e1bbc0f | Version Fixed In: | |
Attachments: |
Patch which fixes the problem for me
Somewhat improved patch |
Description
Andrew Stitcher
2013-12-12 07:12:47 UTC
Created attachment 84055 [details]
Patch which fixes the problem for me
This is about the simplest solution I could think of, however it is not very flexible in that it just expands the possible names to "ninja" & "ninja-build" which should work for usual ninja installations I think, but isn't future proof in case it is called something different somewhere else.
Another comment I'll make is that when the ninja plugin isn't loaded, but the cmake builder tries to build a ninja project it will just not do anything, and the build needs to be manually stopped. It looks like the cmake builder will create a job for the ninja plugin even if it is not loaded which seems like another bug to me. Created attachment 84056 [details]
Somewhat improved patch
Tidied up patch a bit.
Patch looks fine, but i'd rather say that findExe("ninja") should come first. It's the more common naming scheme. Aleix or Ivan, can you take care of this? Git commit 384b2335efc3c69a61914bf3c2874c492e1bbc0f by Aleix Pol, on behalf of Andrew Stitcher. Committed on 12/12/2013 at 11:02. Pushed by apol into branch '4.6'. Find ninja if the binary name is ninja-build Apparently, some systems name ninja-build to the ninja building tool. This patch figures out the executable in runtime, so the executable can be "ninja" or "ninja-build" and still work. M +1 -2 projectbuilders/ninjabuilder/kdevninjabuilderplugin.cpp M +11 -1 projectbuilders/ninjabuilder/ninjajob.cpp M +1 -0 projectbuilders/ninjabuilder/ninjajob.h http://commits.kde.org/kdevelop/384b2335efc3c69a61914bf3c2874c492e1bbc0f Hi Andrew! I just pushed the patch, thank you! :) PS: I'd suggest that next time you send it to http://reviewboard.kde.org (In reply to comment #4) > Patch looks fine, but i'd rather say that findExe("ninja") should come > first. It's the more common naming scheme. Kinda irrelevant now that Aleix already pushed the change: Searching for "ninja-build" needs to come before searching for "ninja" because if they are both present then the "ninja" executable is actually a game not the build system! Yeah. You're right, it makes more sense to search for the more specific first, for the reasons you mentioned. |