Bug 39164

Summary: [CMake] Cleanup generator code and port it to windows.
Product: WebKit Reporter: Patrick R. Gansterer <paroga>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, leandro, manyoso, skyul
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 39163, 43918    
Bug Blocks: 43906    
Attachments:
Description Flags
Patch
none
Patch
commit-queue: commit-queue-
Patch (cleanup GENERATE_GPERF+GENERATE_GRAMMAR) none

Description Patrick R. Gansterer 2010-05-15 08:43:59 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-05-15 09:00:15 PDT
Created attachment 56156 [details]
Patch

This patch is only for the non IDL generators.
Comment 2 Patrick R. Gansterer 2010-05-15 11:04:26 PDT
Created attachment 56159 [details]
Patch

JSC_DIR changed to JAVASCRIPTCORE_DIR
Comment 3 Nikolas Zimmermann 2010-07-30 22:56:51 PDT
Comment on attachment 56159 [details]
Patch

Looks fine to me, even if I'm not a CMake expert.
Comment 4 WebKit Commit Bot 2010-07-30 23:46:17 PDT
Comment on attachment 56159 [details]
Patch

Rejecting patch 56159 from commit-queue.

Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Nikolas Zimmermann', u'--force']" exit_code: 1
Parsed 4 diffs from patch file(s).
(Stripping trailing CRs from patch.)
patching file ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
(Stripping trailing CRs from patch.)
patching file cmake/WebKitGenerators.cmake
Hunk #1 FAILED at 7.
Hunk #2 FAILED at 100.
2 out of 2 hunks FAILED -- saving rejects to file cmake/WebKitGenerators.cmake.rej
(Stripping trailing CRs from patch.)
patching file cmake/WebKitMacros.cmake

Full output: http://queues.webkit.org/results/3585731
Comment 5 Patrick R. Gansterer 2010-07-31 07:01:26 PDT
Created attachment 63151 [details]
Patch (cleanup GENERATE_GPERF+GENERATE_GRAMMAR)

This is only a part of the previous patch. More will follow.
Comment 6 Adam Barth 2010-08-10 22:52:50 PDT
Comment on attachment 56159 [details]
Patch

Clearing zimmermann's r+.  This patch appears to be out of date.
Comment 7 Patrick R. Gansterer 2010-08-11 02:36:53 PDT
(In reply to comment #6)
> (From update of attachment 56159 [details])
> Clearing zimmermann's r+.  This patch appears to be out of date.
Maybe you (or someone else) can give the patch a r+, until it gets again out of date? (Maybe it is already) This patch is now nearly 3 months old!!!
Comment 8 Nikolas Zimmermann 2010-08-12 01:23:51 PDT
Comment on attachment 63151 [details]
Patch (cleanup GENERATE_GPERF+GENERATE_GRAMMAR)

Looks okay to me. r+
Comment 9 WebKit Commit Bot 2010-08-12 01:51:18 PDT
Comment on attachment 63151 [details]
Patch (cleanup GENERATE_GPERF+GENERATE_GRAMMAR)

Clearing flags on attachment: 63151

Committed r65225: <http://trac.webkit.org/changeset/65225>
Comment 10 WebKit Commit Bot 2010-08-12 01:51:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Nikolas Zimmermann 2010-08-13 03:49:32 PDT
Comment on attachment 63151 [details]
Patch (cleanup GENERATE_GPERF+GENERATE_GRAMMAR)

Let's retry, EFL should work, according to paroga.
Comment 12 Patrick R. Gansterer 2010-08-13 05:43:37 PDT
patch has been reverted in http://trac.webkit.org/changeset/65246
Comment 13 WebKit Commit Bot 2010-08-13 06:17:41 PDT
Comment on attachment 63151 [details]
Patch (cleanup GENERATE_GPERF+GENERATE_GRAMMAR)

Clearing flags on attachment: 63151

Committed r65319: <http://trac.webkit.org/changeset/65319>
Comment 14 WebKit Commit Bot 2010-08-13 06:17:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Leandro Pereira 2010-08-13 09:48:34 PDT
(In reply to comment #11)
> (From update of attachment 63151 [details])
> Let's retry, EFL should work, according to paroga.

Strangely enough, the other time the same patch was added to SVN, WebCore's CMakeLists.txt didn't get updated to reflect the changes. It seems to be fine now, but while trying to build with this patch, I get the following message (clean SVN tree):

CMake Error at cmake/WebKitGenerators.cmake:137 (FIND_PACKAGE_HANDLE_STANDARD_ARGS):
  Unknown CMake command "FIND_PACKAGE_HANDLE_STANDARD_ARGS".
Call Stack (most recent call first):
  CMakeLists.txt:15 (INCLUDE)

I'm on CMake 2.8.2, so I don't think this is standard. I was able to find a file that defines this macro, and the build now seems to work after I include it. The file does not, however, mention its license, so I cannot upload it to the WebKit repo.

Patrick, could you please send another patch adding the definition of this macro?
Comment 16 Patrick R. Gansterer 2010-08-13 10:02:59 PDT
(In reply to comment #15)
> I'm on CMake 2.8.2, so I don't think this is standard.
This code is from you! ;-)

Removing the following lines should fix the problem:FIND_PROGRAM(FLEX_EXECUTABLE flex)
IF (NOT FLEX_EXECUTABLE)
  MESSAGE(FATAL_ERROR "Missing flex")
ENDIF ()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Flex DEFAULT_MSG FLEX_EXECUTABLE)

FLEX_EXECUTABLE will be set by FIND_PACKAGE(FLEX REQUIRED) in the root CMakeList.txt already.
Comment 17 Leandro Pereira 2010-08-13 10:06:18 PDT
(In reply to comment #16)
> (In reply to comment #15)
> > I'm on CMake 2.8.2, so I don't think this is standard.
> This code is from you! ;-)
> 

Oops :)

Your suggestion worked; I'll let the build finish and will commit a fix shortly. Sorry for the trouble.