Bug 97516

Summary: [CMake] Remove support for cmake version < 2.8.3
Product: WebKit Reporter: Laszlo Gombos <laszlo.gombos>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: afonso.costa, commit-queue, gyuyoung.kim, gyuyoung.kim, ossy, rakuco, ryuan.choi
Priority: P2 Keywords: EasyFix
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
gyuyoung.kim: review-
Patch v2
none
Patch v3 none

Description Laszlo Gombos 2012-09-24 21:00:29 PDT
http://trac.webkit.org/changeset/125228 made cmake version 2.8.3 a requirement but did not removed some code that supports cmake version < 2.8.3 - according to https://bugs.webkit.org/show_bug.cgi?id=84895#c21. This bug is to remove the remaining dead code/refactor existing code to take advantage of cmake version 2.8.3+
Comment 1 Laszlo Gombos 2012-11-23 07:52:18 PST
Note that FindGStreamer.cmake and FindCairo.cmake can be now simplified assuming cmake >=2.8.3.
Comment 2 Afonso Costa 2013-10-11 13:20:47 PDT
Created attachment 214018 [details]
Patch
Comment 3 Gyuyoung Kim 2013-10-13 18:02:21 PDT
Comment on attachment 214018 [details]
Patch

LGTM
Comment 4 Ryuan Choi 2013-10-13 20:43:08 PDT
Comment on attachment 214018 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=214018&action=review

> ChangeLog:3
> +        [CMAKE] Update code to take advantage of CMake version 2.8.3+.

Hmm, Bug title should be same with Bug 97516 although this looks more informative.

> Source/cmake/FindCairo.cmake:-78
> -endif ()

I am not sure.
With this patch, find_package(Cairo 999.10.2 REQUIRED) is fine.
Comment 5 Gyuyoung Kim 2013-10-13 20:52:26 PDT
Comment on attachment 214018 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=214018&action=review

>> Source/cmake/FindCairo.cmake:-78
>> -endif ()
> 
> I am not sure.
> With this patch, find_package(Cairo 999.10.2 REQUIRED) is fine.

This review comment isn't clear for me. Currently we use "Cairo 1.10.2" for EFL and GTK ports. Do you mean this patch will not support 999.10.2 version style ?
Comment 6 Ryuan Choi 2013-10-13 21:09:54 PDT
(In reply to comment #5)
> (From update of attachment 214018 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=214018&action=review
> 
> >> Source/cmake/FindCairo.cmake:-78
> >> -endif ()
> > 
> > I am not sure.
> > With this patch, find_package(Cairo 999.10.2 REQUIRED) is fine.
> 
> This review comment isn't clear for me. Currently we use "Cairo 1.10.2" for EFL and GTK ports. Do you mean this patch will not support 999.10.2 version style ?

I mean that FindCairo.cmake will not complain with this pacth although find_package requests higher version than current version which system have.

999.10.2 is just one of example, which is higher version than currently installed.

I think that FindCairo.cmake should raise assert when find_package request higer version.
Comment 7 Gyuyoung Kim 2013-10-13 22:59:57 PDT
Comment on attachment 214018 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=214018&action=review

>>>> Source/cmake/FindCairo.cmake:-78
>>>> -endif ()
>>> 
>>> I am not sure.
>>> With this patch, find_package(Cairo 999.10.2 REQUIRED) is fine.
>> 
>> This review comment isn't clear for me. Currently we use "Cairo 1.10.2" for EFL and GTK ports. Do you mean this patch will not support 999.10.2 version style ?
> 
> I mean that FindCairo.cmake will not complain with this pacth although find_package requests higher version than current version which system have.
> 
> 999.10.2 is just one of example, which is higher version than currently installed.
> 
> I think that FindCairo.cmake should raise assert when find_package request higer version.

Ok, I see. This patch can't generate compilation fail when higher version is required. This patch should check if higher version is required.
Comment 8 Afonso Costa 2013-10-14 08:15:10 PDT
(In reply to comment #7)
> (From update of attachment 214018 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=214018&action=review
> 
> >>>> Source/cmake/FindCairo.cmake:-78
> >>>> -endif ()
> >>> 
> >>> I am not sure.
> >>> With this patch, find_package(Cairo 999.10.2 REQUIRED) is fine.
> >> 
> >> This review comment isn't clear for me. Currently we use "Cairo 1.10.2" for EFL and GTK ports. Do you mean this patch will not support 999.10.2 version style ?
> > 
> > I mean that FindCairo.cmake will not complain with this pacth although find_package requests higher version than current version which system have.
> > 
> > 999.10.2 is just one of example, which is higher version than currently installed.
> > 
> > I think that FindCairo.cmake should raise assert when find_package request higer version.
> 
> Ok, I see. This patch can't generate compilation fail when higher version is required. This patch should check if higher version is required.


Hi Ryuan and Gyuyoung,

thanks for review.

I've updated the patch according to your suggestions. But, I have one doubt yet: are the changes in the other files ok for you or do I need to make the check also?
Comment 9 Afonso Costa 2013-10-14 11:36:07 PDT
Created attachment 214171 [details]
Patch v2

The initial patch was updated:
- Raise a message when the required version is higher than found version.
- I've removed the changes in the files used by GTK build (it seems that GTK is using autotools instead of CMake).
Comment 10 Gyuyoung Kim 2013-10-14 22:49:52 PDT
Comment on attachment 214171 [details]
Patch v2

View in context: https://bugs.webkit.org/attachment.cgi?id=214171&action=review

> Source/cmake/FindGStreamer.cmake:-108
> -endif ()

Why didn't you adjust it to gstreamer ?
Comment 11 Afonso Costa 2013-10-15 06:56:48 PDT
(In reply to comment #10)
> (From update of attachment 214171 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=214171&action=review
> 
> > Source/cmake/FindGStreamer.cmake:-108
> > -endif ()
> 
> Why didn't you adjust it to gstreamer ?

Hi Gyuyoung,

because if I change the gstreamer's required version in find_package a message is already raised. Maybe this behaviour is related to REQUIRED_VARS.

But, I can put the check in FindGStreamer also, no problem.
Comment 12 Afonso Costa 2013-10-15 07:09:00 PDT
Created attachment 214255 [details]
Patch v3

Checking if the GStreamer required version is higher than found version (same way that is being used in FindCairo.cmake)
Comment 13 Gyuyoung Kim 2013-10-15 17:53:44 PDT
Comment on attachment 214255 [details]
Patch v3

View in context: https://bugs.webkit.org/attachment.cgi?id=214255&action=review

I checked this patch can check if higher version is required. However, Ryuan might want to have a final look before landing.

> ChangeLog:3
> +        [CMAKE] Update code to take advantage of CMake version 2.8.3+.

Please sync with this bug title before landing. It looks this one is better than this bug title.
Comment 14 Gyuyoung Kim 2013-10-16 21:49:42 PDT
Any update ? Ryuan ?
Comment 15 Ryuan Choi 2013-10-17 00:20:33 PDT
Comment on attachment 214255 [details]
Patch v3

Looks fine to me.
Comment 16 WebKit Commit Bot 2013-10-17 00:44:47 PDT
Comment on attachment 214255 [details]
Patch v3

Clearing flags on attachment: 214255

Committed r157562: <http://trac.webkit.org/changeset/157562>
Comment 17 WebKit Commit Bot 2013-10-17 00:44:50 PDT
All reviewed patches have been landed.  Closing bug.