I've been using this for a bit for developing Skia and Chromium on Linux using
KDevelop, so I figured I could send this out to be reviewed and see if there is
any interest in this going into the main gyp tree. As is stated in the header,
the point of this is not to be able to build using cmake, but to produce a
CMakeLists.txt which can be used with KDevelop. KDevelop provides a number of
nice IDE features for code navigation and auto completion, as well as a
debugger.
On 2012/04/13 16:02:10, scottmg wrote:
> If it's not for building with cmake, maybe call it kdevelop instead? Or are
you
> planning on eventually getting it to build?
Ah, you asked the tricky question. Getting it to work in general (aka building
Chrome) is hard and probably not something which can be done all at once.
However, this does build Skia. So the answer is "maybe".
So I thought, "How hard can it be?" Anyhow, at this point I think I need
'link_settings':{'libraries'} information from gyp static library targets in
order for things to work out. There are some comments to this effect in this
patch (2).
CMake has full automatic link ordering built in and it cannot be turned off.
CMake expects all targets to state what their real dependencies are and it uses
this information to automatically figure out a workable link line, including in
the case of circular dependencies. It appears that some targets in Chrome depend
on the -Wl,--start-group -Wl,--end-group for some dependencies to get resolved,
as opposed to declaring them where they are. This could actually be seen as a
benefit, as it may help clean things up a bit if used.
As a result, this mostly builds Chrome, though I'm sure there are probably
things missing. I haven't figured out how to hook it up to the gyp tests yet. It
has been rather useful with KDevelop already, as it is nice to have an IDE on
Linux (which isn't Eclipse).
I'm going to give up for the time being on trying to fix linker problems ...
12 years, 4 months ago
(2012-12-13 21:16:39 UTC)
#5
I'm going to give up for the time being on trying to fix linker problems with
CMake. The gulf between CMake trying to figure out the link line in advance and
Gyp letting the linker figure it out later isn't one I have time to bridge at
the moment. I've changed the name of the generator from 'cmake' to 'kdevelop'
and am now requesting that this generator be accepted with similar conditions
and provisos as the 'eclipse' generator.
I've been using and tweaking this for some time now with both Skia and Chromium
for editing with KDevelop. It hasn't required any tweaks in a while, so I'm
throwing it back out into the wild for review.
With Patch Set 4 it is now possible to build and link Chromium, and it ...
12 years, 2 months ago
(2013-02-14 16:36:30 UTC)
#6
With Patch Set 4 it is now possible to build and link Chromium, and it passes
most of the tests. The only failing tests now are
Failed the following 3 tests:
test/defines/gyptest-define-override.py
test/defines/gyptest-defines.py
test/standalone/gyptest-standalone.py
The two 'defines' tests are failing because CMake flat out refuses to pass a
compiler flag with '#' in it (there is code which specifically checks for '#' in
a define and skips the define and prints a warning if one is found). Removing
the '#' from the test makes things pass. I'd prefer not to exclude this whole
test though.
The 'standalone' test is just looking to see if the gyp file name is mentioned
in the result. It currently is, but in a comment. I'd prefer not to remove the
comments (which state the fully qualified target name) as they've been rather
helpful in navigating the resulting file. I'll have to see if there is any good
way around this.
Also, as noted in the comments, this currently only creates CMakeLists.txt files
capable of building on Linux. There will need to be some more work to support
other platforms.
The larger issue is that the new TestGypCMake requires CMake 2.8.8 or better on
the PATH (needed for target defines and ninja generator). Ubuntu 12.04 (I think
that's what the buildbots are based on) is stuck at 2.8.7. As a result it may
require some work for the new TestGypCMake to be able to run on the bots.
On 2013/02/14 16:36:30, bungeman of chrome wrote: > With Patch Set 4 it is now ...
12 years, 2 months ago
(2013-02-14 17:01:01 UTC)
#7
On 2013/02/14 16:36:30, bungeman of chrome wrote:
> With Patch Set 4 it is now possible to build and link Chromium, and it passes
> most of the tests.
That's great!
(I'm not sure if in months gone by I added myself or you added me. I've never
used CMake or KDevelop so my review would be cursory, at best. Does anyone else
feel qualified to review this change?)
On 2013/02/15 17:51:30, sbc wrote: > How to you suggest I install the required version ...
12 years, 2 months ago
(2013-02-15 18:46:44 UTC)
#10
On 2013/02/15 17:51:30, sbc wrote:
> How to you suggest I install the required version of cmake
> on my precise machine?
Well, I checked it out and built it (even boot-strapped it just for the fun of
it), but then I was also interested in taking a look at the code a bit to
discover some rather undocumented details. The easiest way is probably to get it
from http://www.cmake.org/cmake/resources/software.html . If you get the tar.gz
version I think you can extract just the bin/cmake executable and put that on
your path while experimenting.
Issue 5996048: Add cmake generator for KDevelop support.
(Closed)
Created 13 years ago by bungeman of chrome
Modified 12 years, 2 months ago
Reviewers: Mark Mentovai, scottmg, sbc
Base URL: http://gyp.googlecode.com/svn/trunk/
Comments: 64