Bug 154450 - [cmake] Moved library setup code to WEBKIT_FRAMEWORK macro.
Summary: [cmake] Moved library setup code to WEBKIT_FRAMEWORK macro.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-19 06:19 PST by Konstantin Tokarev
Modified: 2016-02-22 11:32 PST (History)
7 users (show)

See Also:


Attachments
Patch (13.40 KB, patch)
2016-02-19 06:23 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (14.33 KB, patch)
2016-02-19 12:44 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (13.64 KB, patch)
2016-02-19 14:18 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (13.64 KB, patch)
2016-02-20 02:53 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (13.56 KB, patch)
2016-02-20 04:26 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (12.92 KB, patch)
2016-02-20 12:01 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2016-02-19 06:19:45 PST
Moved library setup code to WEBKIT_FRAMEWORK macro.
Comment 1 Konstantin Tokarev 2016-02-19 06:23:24 PST
Created attachment 271750 [details]
Patch
Comment 2 Konstantin Tokarev 2016-02-19 12:44:39 PST
Created attachment 271785 [details]
Patch
Comment 3 Konstantin Tokarev 2016-02-19 14:18:40 PST
Created attachment 271798 [details]
Patch
Comment 4 Konstantin Tokarev 2016-02-20 02:53:36 PST
Created attachment 271855 [details]
Patch
Comment 5 Konstantin Tokarev 2016-02-20 04:26:13 PST
Created attachment 271860 [details]
Patch
Comment 6 Michael Catanzaro 2016-02-20 08:12:50 PST
Comment on attachment 271860 [details]
Patch

I think the value of moving this duplicate code to a macro probably outweighs the value of being explicit, so I'm OK with this. I want to give Alex and Martin a chance to chime in, though.

I'm not sure about getting rid of WebKit2_DERIVED_SOURCES, because I think we might want to set different CPPFLAGS there to silence some warnings we currently have. And Alex has a patch introducing WebCore_DERIVED_SOURCES in bug #151399.
Comment 7 Konstantin Tokarev 2016-02-20 08:26:38 PST
(In reply to comment #6)
> I think the value of moving this duplicate code to a macro probably
> outweighs the value of being explicit, so I'm OK with this.

It seems to me that there is established set of "standard" variables for each WebKit target that configure it. So this patch would not only reduce code size, but would also help to make target behavior more consistent in future. I'm planning to submit similar patches for binaries and non-framework libraries.

Also, it would simplify addition of new configurable properties, e.g. in Qt port we would like to override precompiled header files via variables like WebCore_PRECOMPILED_HEADER.

 I want to give
> Alex and Martin a chance to chime in, though.
> 
> I'm not sure about getting rid of WebKit2_DERIVED_SOURCES, because I think
> we might want to set different CPPFLAGS there to silence some warnings we
> currently have. And Alex has a patch introducing WebCore_DERIVED_SOURCES in
> bug #151399.

Note that he adds WebCore_DERIVEDSOURCES, not WebCore_DERIVED_SOURCES, breaking "convention" of WebKit2. If we really need to use different flags on derived sources, I will add ${${_target}_DERIVED_SOURCES} to source list of target.
Comment 8 Konstantin Tokarev 2016-02-20 12:01:50 PST
Created attachment 271864 [details]
Patch
Comment 9 Konstantin Tokarev 2016-02-20 12:16:45 PST
Restored DERIVED_SOURCES.
Comment 10 Alex Christensen 2016-02-22 10:32:18 PST
Comment on attachment 271864 [details]
Patch

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

> Source/WebKit2/CMakeLists.txt:-789
> -    set_target_properties(WebKit2 PROPERTIES OUTPUT_NAME ${WebKit2_OUTPUT_NAME})

I was under the impression set_target_properties only worked after the target had been made with add_library already.  This is only used on Windows to my knowledge, and Windows EWS would report a successful build with different output names, which we would not want.
Comment 11 Konstantin Tokarev 2016-02-22 10:38:43 PST
Comment on attachment 271864 [details]
Patch

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

>> Source/WebKit2/CMakeLists.txt:-789
>> -    set_target_properties(WebKit2 PROPERTIES OUTPUT_NAME ${WebKit2_OUTPUT_NAME})
> 
> I was under the impression set_target_properties only worked after the target had been made with add_library already.  This is only used on Windows to my knowledge, and Windows EWS would report a successful build with different output names, which we would not want.

GTK+ port uses WebKit2_OUTPUT_NAME, and I've verified that it works.
Comment 12 Alex Christensen 2016-02-22 10:41:11 PST
Comment on attachment 271864 [details]
Patch

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

>>> Source/WebKit2/CMakeLists.txt:-789
>>> -    set_target_properties(WebKit2 PROPERTIES OUTPUT_NAME ${WebKit2_OUTPUT_NAME})
>> 
>> I was under the impression set_target_properties only worked after the target had been made with add_library already.  This is only used on Windows to my knowledge, and Windows EWS would report a successful build with different output names, which we would not want.
> 
> GTK+ port uses WebKit2_OUTPUT_NAME, and I've verified that it works.

ok, sounds good.  I'll take a close look at the output after this lands, but I don't anticipate any problems, then.
Comment 13 WebKit Commit Bot 2016-02-22 11:32:44 PST
Comment on attachment 271864 [details]
Patch

Clearing flags on attachment: 271864

Committed r196947: <http://trac.webkit.org/changeset/196947>
Comment 14 WebKit Commit Bot 2016-02-22 11:32:50 PST
All reviewed patches have been landed.  Closing bug.