Bug 140497

Summary: [CMAKE] Fix cmake warning
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: New BugsAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: gustavo, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 136194    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Gyuyoung Kim 2015-01-15 07:42:49 PST
r173155 already tried to fix cmake warning though, the warning is still exist. CMAKE_LINK_INTERFACE_LIBRARIES seems to cause this warning. INTERFACE_LINK_LIBRARIES contains the list of transitive link dependencies, and CMAKE_LINK_INTERFACE_LIBRARIES can override the INTERFACE_LINK_LIBRARIES property when CMP0022 is not set. CMake warns this override. To avoid it, EFL port doesn't set CMAKE_LINK_INTERFACE_LIBRARIES.
Comment 1 Gyuyoung Kim 2015-01-15 07:43:46 PST
Created attachment 244693 [details]
Patch
Comment 2 Gustavo Noronha (kov) 2015-01-19 03:03:38 PST
I think we should probably remove that for all ports. We seem to be settings LINK_INTERFACE_LIBRARIES explicitly on each library anyway (which is probably what leads to the warning?).
Comment 3 Gyuyoung Kim 2015-01-19 04:31:43 PST
Created attachment 244895 [details]
Patch
Comment 4 Gyuyoung Kim 2015-01-19 04:40:38 PST
(In reply to comment #2)
> I think we should probably remove that for all ports. We seem to be settings
> LINK_INTERFACE_LIBRARIES explicitly on each library anyway (which is
> probably what leads to the warning?).

I didn't check if other ports also have same issue. That's why I only disabled to set it only for EFL port. As mentioned in ChangeLog, INTERFACE_LINK_LIBRARIES variable seems to be already set on each library. It seems CMP0022 policy of cmake warns that CMAKE_LINK_INTERFACE_LIBRARIES can override INTERFACE_LINK_LIBRARIES on some targets. If other ports also have same problem, I think my latest patch looks good.



Build warning is as below,

CMake Warning (dev) in Source/JavaScriptCore/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "JavaScriptCore" has an INTERFACE_LINK_LIBRARIES property which
  differs from its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    WTF;/usr/lib/x86_64-linux-gnu/libicui18n.so

  LINK_INTERFACE_LIBRARIES:

    

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in Source/cmake/gtest/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "gtest" has an INTERFACE_LINK_LIBRARIES property which differs from
  its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    WTF;-lpthread

  LINK_INTERFACE_LIBRARIES:

    

This warning is for project developers.  Use -Wno-dev to suppress it.
Comment 5 Gyuyoung Kim 2015-01-19 07:21:44 PST
Created attachment 244903 [details]
Patch
Comment 6 Gustavo Noronha (kov) 2015-01-19 09:32:49 PST
Comment on attachment 244903 [details]
Patch

Please indicate in the changelog that that is already set for individual library targets, thanks!
Comment 7 Gyuyoung Kim 2015-01-19 16:32:11 PST
Created attachment 244936 [details]
Patch for landing
Comment 8 Gyuyoung Kim 2015-01-19 16:36:38 PST
Committed r178682: <http://trac.webkit.org/changeset/178682>
Comment 9 Gyuyoung Kim 2015-01-19 16:37:48 PST
(In reply to comment #6)
> Comment on attachment 244903 [details]
> Patch
> 
> Please indicate in the changelog that that is already set for individual
> library targets, thanks!

Done, thanks.