<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>196704</bug_id>
          
          <creation_ts>2019-04-08 14:04:24 -0700</creation_ts>
          <short_desc>[Meta][CMake] Refactoring CMake project to target-oriented design</short_desc>
          <delta_ts>2023-12-27 22:25:48 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CMake</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>180064</dependson>
    
    <dependson>196792</dependson>
    
    <dependson>196655</dependson>
    
    <dependson>196706</dependson>
    
    <dependson>196741</dependson>
    
    <dependson>196742</dependson>
    
    <dependson>196904</dependson>
    
    <dependson>197112</dependson>
    
    <dependson>197173</dependson>
    
    <dependson>198046</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Don Olmstead">don.olmstead</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>annulen</cc>
    
    <cc>fujii</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>rjcdmt666</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1525351</commentid>
    <comment_count>0</comment_count>
    <who name="Don Olmstead">don.olmstead</who>
    <bug_when>2019-04-08 14:04:24 -0700</bug_when>
    <thetext>Currently the CMake build does not mimic libraries being built in isolation. This can lead to some flakiness and potential sources of error due to how includes work within a webkit library/framework.

As an example headers are all placed into ForwardingHeaders. This means that someone could include include a WebCore header from inside JavaScriptCore. Same goes for the DerviedSources which all output to the same root.

Each library/framework should be built similar to an external project within CMake.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525353</commentid>
    <comment_count>1</comment_count>
    <who name="Don Olmstead">don.olmstead</who>
    <bug_when>2019-04-08 14:09:22 -0700</bug_when>
    <thetext>The idea is to have the same behavior as Apple&apos;s internal builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525359</commentid>
    <comment_count>2</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2019-04-08 14:17:33 -0700</bug_when>
    <thetext>We aren&apos;t talking here about using actual ExternaProjects, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525361</commentid>
    <comment_count>3</comment_count>
    <who name="Don Olmstead">don.olmstead</who>
    <bug_when>2019-04-08 14:20:15 -0700</bug_when>
    <thetext>(In reply to Konstantin Tokarev from comment #2)
&gt; We aren&apos;t talking here about using actual ExternaProjects, right?

Not yet but this would be an intermediary step towards that. Once its done and tested then we can see if Apple would be willing to give that a go so we can have one build system to rule them all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525363</commentid>
    <comment_count>4</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2019-04-08 14:24:39 -0700</bug_when>
    <thetext>I oppose to such change, that would unnecessarily complicate things for other ports and increase build time, especially for incremental builds</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525364</commentid>
    <comment_count>5</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2019-04-08 14:26:13 -0700</bug_when>
    <thetext>However Windows ports could use such set up if they wish to</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525374</commentid>
    <comment_count>6</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2019-04-08 14:35:04 -0700</bug_when>
    <thetext>IDE integration would also suffer from such change, now I can open one root project for everything, and with such change I would nee to open several projects and jump between them</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525378</commentid>
    <comment_count>7</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2019-04-08 14:39:27 -0700</bug_when>
    <thetext>What we actually want to achieve here is to prevent things from breaking because of different and undeterministic order of include directories. This goal is entirely feasible to achieve without breaking of integral cmake project into pieces</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525381</commentid>
    <comment_count>8</comment_count>
    <who name="Don Olmstead">don.olmstead</who>
    <bug_when>2019-04-08 14:43:30 -0700</bug_when>
    <thetext>(In reply to Konstantin Tokarev from comment #7)
&gt; What we actually want to achieve here is to prevent things from breaking
&gt; because of different and undeterministic order of include directories. This
&gt; goal is entirely feasible to achieve without breaking of integral cmake
&gt; project into pieces

Sorry I don&apos;t think I was clear enough for you here.

This work is about cleaning up the CMake code so that includes function properly and prevent any misuse that would lead to losing deterministic builds.

Do I think we should move to external project at this time?

No. If Apple were willing to switch completely to CMake and because of how they build we needed to use external projects then yes I would be in favor of that.

This work would complement such a change but it is not my intention to move to external project at this time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525392</commentid>
    <comment_count>9</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2019-04-08 14:49:58 -0700</bug_when>
    <thetext>OK, this is fine with me. Sorry for misunderstanding your intentions. I think it may be useful to rename this meta-issue into something like &quot;Refactoring CMake project to target-oriented design&quot; to avoid misunderstanding</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525396</commentid>
    <comment_count>10</comment_count>
    <who name="Don Olmstead">don.olmstead</who>
    <bug_when>2019-04-08 14:51:51 -0700</bug_when>
    <thetext>(In reply to Konstantin Tokarev from comment #9)
&gt; OK, this is fine with me. Sorry for misunderstanding your intentions. I
&gt; think it may be useful to rename this meta-issue into something like
&gt; &quot;Refactoring CMake project to target-oriented design&quot; to avoid
&gt; misunderstanding

Changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525401</commentid>
    <comment_count>11</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2019-04-08 14:54:26 -0700</bug_when>
    <thetext>Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>