<?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>158727</bug_id>
          
          <creation_ts>2016-06-14 00:25:22 -0700</creation_ts>
          <short_desc>[Win][CMake] Changes in WebKit options are not reflected in incremental builds.</short_desc>
          <delta_ts>2016-06-15 10:06:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>fujii</cc>
    
    <cc>lforschler</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1202115</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2016-06-14 00:25:22 -0700</bug_when>
    <thetext>Changing one of the WebKit options in OptionsWin.cmake, have no effect on incremental builds. This happens because the CMake option command only sets an initial value. Incremental builds will use the cached value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202194</commentid>
    <comment_count>1</comment_count>
      <attachid>281261</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2016-06-14 08:36:35 -0700</bug_when>
    <thetext>Created attachment 281261
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202195</commentid>
    <comment_count>2</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2016-06-14 08:43:10 -0700</bug_when>
    <thetext>I am not convinced that this is the best fix for this, since it creates a &quot;normal&quot; CMake variable instead of a persistent, cached CMake variable. It might cause other problems.

Another option is to create a cached variable with &apos;set&apos; and force update the cache:

set(${_name} ${_WEBKIT_AVAILABLE_OPTIONS_INITIAL_VALUE_${_name}} CACHE BOOL &quot;${_WEBKIT_AVAILABLE_OPTIONS_DESCRIPTION_${_name}}&quot; FORCE)

I believe this will be the same as using &apos;option&apos;, except that the CMake cache will be updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202196</commentid>
    <comment_count>3</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-06-14 09:04:43 -0700</bug_when>
    <thetext>I think GTK and EFL are using shouldRemoveCMakeCache is webkitdirs.pm.  Are we using that on Windows?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202506</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2016-06-14 23:50:39 -0700</bug_when>
    <thetext>I think you need to check the variable is already defined before setting.

&gt; if (DEFINED ${_name})

Because the variable can be given like cmake -D ENABLE_MATHML=OFF if I invoke build-webkit --no-mathml.

This change affects developers who don&apos;t use build-webkit for incremental builds like me.
In incremental builds, cmake will be run automatically by invoking ninja or Visual Studio&apos;s build command if CMake scripts have been modified.
In this time, build options will be restored from CMakeCache.txt.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202515</commentid>
    <comment_count>5</comment_count>
      <attachid>281342</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2016-06-15 00:22:25 -0700</bug_when>
    <thetext>Created attachment 281342
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202517</commentid>
    <comment_count>6</comment_count>
      <attachid>281342</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-06-15 00:28:17 -0700</bug_when>
    <thetext>Comment on attachment 281342
Patch

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

&gt; Tools/Scripts/build-webkit:247
&gt; +    removeCMakeCache(@featureArgs);

Strange- this isn&apos;t called anywhere else.  What is gtk doing?

&gt; Tools/Scripts/webkitdirs.pm:1908
&gt; +        my $winConfiguration = File::Spec-&gt;catdir(sourceDir(), &quot;Source&quot;, &quot;cmake&quot;, &quot;OptionsWin.cmake&quot;);

Yep, cmakeBasedPortName() would return WinCairo or AppleWin.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202518</commentid>
    <comment_count>7</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2016-06-15 00:31:38 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Comment on attachment 281342 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=281342&amp;action=review
&gt; 
&gt; &gt; Tools/Scripts/build-webkit:247
&gt; &gt; +    removeCMakeCache(@featureArgs);
&gt; 
&gt; Strange- this isn&apos;t called anywhere else.  What is gtk doing?
&gt; 

It is also called on other platforms. Maybe we should avoid duplicating this call?

Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202519</commentid>
    <comment_count>8</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2016-06-15 00:31:57 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I think you need to check the variable is already defined before setting.
&gt; 
&gt; &gt; if (DEFINED ${_name})
&gt; 
&gt; Because the variable can be given like cmake -D ENABLE_MATHML=OFF if I
&gt; invoke build-webkit --no-mathml.
&gt; 
&gt; This change affects developers who don&apos;t use build-webkit for incremental
&gt; builds like me.
&gt; In incremental builds, cmake will be run automatically by invoking ninja or
&gt; Visual Studio&apos;s build command if CMake scripts have been modified.
&gt; In this time, build options will be restored from CMakeCache.txt.

Thanks for looking into this :)

The latest patch deletes the CMake cache file if options have been modified. Will this work for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202523</commentid>
    <comment_count>9</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2016-06-15 00:57:30 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; The latest patch deletes the CMake cache file if options have been modified.
&gt; Will this work for you?

Yes. Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202592</commentid>
    <comment_count>10</comment_count>
      <attachid>281342</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-06-15 09:45:59 -0700</bug_when>
    <thetext>Comment on attachment 281342
Patch

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

&gt;&gt;&gt; Tools/Scripts/build-webkit:247
&gt;&gt;&gt; +    removeCMakeCache(@featureArgs);
&gt;&gt; 
&gt;&gt; Strange- this isn&apos;t called anywhere else.  What is gtk doing?
&gt; 
&gt; It is also called on other platforms. Maybe we should avoid duplicating this call?
&gt; 
&gt; Thanks for reviewing!

Oh, I gripped before applying this patch and found one call.  I thought I had applied this patch.  You&apos;re right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202599</commentid>
    <comment_count>11</comment_count>
      <attachid>281342</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-06-15 10:06:30 -0700</bug_when>
    <thetext>Comment on attachment 281342
Patch

Clearing flags on attachment: 281342

Committed r202095: &lt;http://trac.webkit.org/changeset/202095&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1202600</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-06-15 10:06:34 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>281261</attachid>
            <date>2016-06-14 08:36:35 -0700</date>
            <delta_ts>2016-06-15 00:22:23 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-158727-20160614083811.patch</filename>
            <type>text/plain</type>
            <size>1494</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDIwMjA0
MykKKysrIENoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDE2LTA2
LTE0ICBQZXIgQXJuZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNvbT4KKworICAgICAgICBbV2lu
XVtDTWFrZV0gQ2hhbmdlcyBpbiBXZWJLaXQgb3B0aW9ucyBhcmUgbm90IHJlZmxlY3RlZCBpbiBp
bmNyZW1lbnRhbCBidWlsZHMuCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3df
YnVnLmNnaT9pZD0xNTg3MjcKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4K
KworICAgICAgICBXaGVuIHRoZSBDTWFrZSAnb3B0aW9uJyBjb21tYW5kIGlzIHVzZWQsIGl0IGlz
IG9ubHkgcG9zc2libGUgdG8gcHJvdmlkZSBhbiBpbml0aWFsIHZhbHVlLgorICAgICAgICBJbmNy
ZW1lbnRhbCBidWlsZHMgd2lsbCB1c2UgdGhlIGNhY2hlZCB2YWx1ZS4gV2UgY2FuIHVzZSB0aGUg
J3NldCcgY29tbWFuZCBpbnN0ZWFkLCB3aGljaAorICAgICAgICB3aWxsIGNyZWF0ZSBhIENNYWtl
IHZhcmlhYmxlIHdoaWNoIGlzIG5vdCBwZXJzaXN0YW50LgorCisgICAgICAgICogU291cmNlL2Nt
YWtlL1dlYktpdEZlYXR1cmVzLmNtYWtlOgorCiAyMDE2LTA2LTEzICBSb21haW4gQmVsbGVzc29y
dCAgPHJvbWFpbi5iZWxsZXNzb3J0QGNyZi5jYW5vbi5mcj4KIAogICAgICAgICBbR1RLXSBFbmFi
bGluZyBTaGFkb3cgRE9NIGJ5IGRlZmF1bHQKSW5kZXg6IFNvdXJjZS9jbWFrZS9XZWJLaXRGZWF0
dXJlcy5jbWFrZQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvY21ha2UvV2ViS2l0RmVhdHVyZXMuY21h
a2UJKHJldmlzaW9uIDIwMTk4NikKKysrIFNvdXJjZS9jbWFrZS9XZWJLaXRGZWF0dXJlcy5jbWFr
ZQkod29ya2luZyBjb3B5KQpAQCAtMjcwLDcgKzI3MCw3IEBAIG1hY3JvKFdFQktJVF9PUFRJT05f
RU5EKQogICAgICAgICAgICAgc2V0KF9NQVhfRkVBVFVSRV9MRU5HVEggJHtfbmFtZV9sZW5ndGh9
KQogICAgICAgICBlbmRpZiAoKQogCi0gICAgICAgIG9wdGlvbigke19uYW1lfSAiJHtfV0VCS0lU
X0FWQUlMQUJMRV9PUFRJT05TX0RFU0NSSVBUSU9OXyR7X25hbWV9fSIgJHtfV0VCS0lUX0FWQUlM
QUJMRV9PUFRJT05TX0lOSVRJQUxfVkFMVUVfJHtfbmFtZX19KQorICAgICAgICBzZXQoJHtfbmFt
ZX0gJHtfV0VCS0lUX0FWQUlMQUJMRV9PUFRJT05TX0lOSVRJQUxfVkFMVUVfJHtfbmFtZX19KQog
ICAgICAgICBpZiAoTk9UIF9XRUJLSVRfQVZBSUxBQkxFX09QVElPTlNfSVNfUFVCTElDXyR7X25h
bWV9KQogICAgICAgICAgICAgbWFya19hc19hZHZhbmNlZChGT1JDRSAke19uYW1lfSkKICAgICAg
ICAgZW5kaWYgKCkK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>281342</attachid>
            <date>2016-06-15 00:22:25 -0700</date>
            <delta_ts>2016-06-15 10:06:30 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-158727-20160615002401.patch</filename>
            <type>text/plain</type>
            <size>1881</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDIwMjA4NSkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE2IEBACisyMDE2LTA2LTE1ICBQZXIgQXJuZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNv
bT4KKworICAgICAgICBbV2luXVtDTWFrZV0gQ2hhbmdlcyBpbiBXZWJLaXQgb3B0aW9ucyBhcmUg
bm90IHJlZmxlY3RlZCBpbiBpbmNyZW1lbnRhbCBidWlsZHMuCisgICAgICAgIGh0dHBzOi8vYnVn
cy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNTg3MjcKKworICAgICAgICBSZXZpZXdlZCBi
eSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBEZWxldGUgQ01ha2UgY2FjaGUgZmlsZSBpZiBX
ZWJLaXQgb3B0aW9ucyBoYXZlIGJlZW4gbW9kaWZpZWQuCisKKyAgICAgICAgKiBTY3JpcHRzL2J1
aWxkLXdlYmtpdDoKKyAgICAgICAgKiBTY3JpcHRzL3dlYmtpdGRpcnMucG06CisgICAgICAgIChz
aG91bGRSZW1vdmVDTWFrZUNhY2hlKToKKwogMjAxNi0wNi0xNCAgS2VpdGggTWlsbGVyICA8a2Vp
dGhfbWlsbGVyQGFwcGxlLmNvbT4KIAogICAgICAgICBKU0Jlbm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w
MjA4NSkKKysrIFRvb2xzL1NjcmlwdHMvd2Via2l0ZGlycy5wbQkod29ya2luZyBjb3B5KQpAQCAt
MTkwNCw2ICsxOTA0LDEzIEBAIHN1YiBzaG91bGRSZW1vdmVDTWFrZUNhY2hlKEApCiAgICAgICAg
IHJldHVybiAxOwogICAgIH0KIAorICAgIGlmKGlzQW55V2luZG93cygpKSB7CisgICAgICAgIG15
ICR3aW5Db25maWd1cmF0aW9uID0gRmlsZTo6U3BlYy0+Y2F0ZGlyKHNvdXJjZURpcigpLCAiU291
cmNlIiwgImNtYWtlIiwgIk9wdGlvbnNXaW4uY21ha2UiKTsKKyAgICAgICAgaWYgKCRjYWNoZUZp
bGVNb2RpZmllZFRpbWUgPCBzdGF0KCR3aW5Db25maWd1cmF0aW9uKS0+bXRpbWUpIHsKKyAgICAg
ICAgICAgIHJldHVybiAxOworICAgICAgICB9CisgICAgfQorCiAgICAgcmV0dXJuIDA7CiB9CiAK
</data>

          </attachment>
      

    </bug>

</bugzilla>