Bug 132062 - [GTK][EFL] Use CMake to generate Eclipse project files
Summary: [GTK][EFL] Use CMake to generate Eclipse project files
Status: RESOLVED DUPLICATE of bug 132190
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brendan Long
Depends on:
Reported: 2014-04-23 08:49 PDT by Brendan Long
Modified: 2014-08-26 11:12 PDT (History)
3 users (show)

See Also:

Patch (1.34 KB, patch)
2014-04-23 09:13 PDT, Brendan Long
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Long 2014-04-23 08:49:09 PDT
CMake can generate Eclipse project files, using either GNU Make or ninja:


The command to do so is almost identical to the normal CMake command. You just replace -G ninja with -G "Eclipse CDT4 - Ninja". Unfortunately, our CMake command is fairly complex, so it would be nice if we could use the same setup as the build-webkit script uses. For reference, the command we want to run looks like this:

Comment 1 Brendan Long 2014-04-23 09:13:54 PDT
Created attachment 229990 [details]

This just creates an Eclipse project file when you run build-webkit. A more complex version might look for a --create-project argument, or maybe a new Tools/Scripts/create-project script. We can also generate other kinds of projects if we wanted to get into that (--create-project eclipse or --create-project kdevelop). Maybe a new script is the way to do since Apple will eventually want this for XCode?
Comment 2 Brendan Long 2014-04-23 10:29:48 PDT
So that creates a sort of weird project. It looks like the .project and .cproject files need to be at the project root for things to work entirely correctly. Just copying the result works:

cp WebKitBuild/Debug/.*project .

Running the cmake command against the root folder causes problems because it creates a bunch of files across the build tree, which is fairly annoying.
Comment 3 Brendan Long 2014-04-24 15:13:36 PDT
I also ran into an issue where C++11 features were causing trouble (std::function, std::unique_ptr, etc.). I had to manually define __cplusplus=201103L to fix that.
Comment 4 Enrique Ocaña 2014-08-26 11:08:54 PDT
Have you seen bug #132190? That patch is already integrated and does what you need if Eclipse is detected.
Comment 5 Brendan Long 2014-08-26 11:12:52 PDT
Thanks for the heads up. Glad to see I wasn't the only one who thought of this.

*** This bug has been marked as a duplicate of bug 132190 ***