[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Review Request 116025: Add documentation about writing find modules
From:       "Alex Merry" <kde () randomguy3 ! me ! uk>
Date:       2014-02-25 18:07:54
Message-ID: 20140225180754.11047.28748 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Feb. 25, 2014, 3:56 p.m., Stephen Kelly wrote:
> > docs/writing-find-modules.md, line 9
> > <https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line9>
> > 
> > You can link to
> > 
> > http://www.cmake.org/cmake/help/git-master/manual/cmake-packages.7.html
> > 
> > for upstream info on this.

I guess http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules is the one \
to extend?


> On Feb. 25, 2014, 3:56 p.m., Stephen Kelly wrote:
> > docs/writing-find-modules.md, line 50
> > <https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line50>
> > 
> > The imported targets should be the primary way of using the module. I don't think the _INCLUDES and \
> > _LIBRARIES etc variables should even be set if imported targets are provided.

Fair point, although for modules we've previously provided, I'm inclined to set them for ease of porting.


> On Feb. 25, 2014, 3:56 p.m., Stephen Kelly wrote:
> > docs/writing-find-modules.md, line 98
> > <https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line98>
> > 
> > I don't think AUTHOR_WARNING is appropriate here. Why not WARNING?

Because it's a warning for authors (of project build scripts) rather than users (ie: those building the \
package).  I thought that was exactly what AUTHOR_WARNING was for...


> On Feb. 25, 2014, 3:56 p.m., Stephen Kelly wrote:
> > docs/writing-find-modules.md, line 153
> > <https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line153>
> > 
> > Don't set Foo_VERSION_STRING, set Foo_VERSION. That is canonical because of config-file packages.

OK; I was following a pattern from other CMake scripts.  Also, it is what \
http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules suggests.


> On Feb. 25, 2014, 3:56 p.m., Stephen Kelly wrote:
> > docs/writing-find-modules.md, line 325
> > <https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line325>
> > 
> > Note that only build-properties of the target itself should be here. Not those of dependencies (if \
> > the dependency provides imported targets, which it should/must for this stuff to work). CMake will \
> > resolve that itself.

Are you saying that INTERFACE_INCLUDE_DIRECTORIES line is wrong?  Or that I should add a comment?


> On Feb. 25, 2014, 3:56 p.m., Stephen Kelly wrote:
> > docs/writing-find-modules.md, line 145
> > <https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line145>
> > 
> > Actually it's mostly important so that users can set it in the cache if they have the library in a \
> > non-predicted location.

Well, I meant the reason we set Foo_LIBRARY and then just set Foo_LIBRARIES to that same value, rather \
than using Foo_LIBRARIES directly.  But I guess I should talk about making the cache entries the user has \
to set consistent.


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116025/#review50830
-----------------------------------------------------------


On Feb. 25, 2014, 10:59 a.m., Alex Merry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116025/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 10:59 a.m.)
> 
> 
> Review request for Build System, Extra Cmake Modules and KDE Frameworks.
> 
> 
> Repository: extra-cmake-modules
> 
> 
> Description
> -------
> 
> Add documentation about writing find modules
> 
> 
> Diffs
> -----
> 
> README.md 85b97b7fa003282e1eeb1113c4668a9b73e3f731 
> docs/writing-find-modules.md PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/116025/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Merry
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/116025/">https://git.reviewboard.kde.org/r/116025/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2014, 3:56 p.m. UTC, <b>Stephen Kelly</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: \
4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line9" style="color: black; \
font-weight: bold; text-decoration: underline;">docs/writing-find-modules.md</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">9</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">determine</span> <span \
class="n">the</span> <span class="n">appropriate</span> <span class="n">information</span> <span \
class="n">about</span> <span class="n">it</span> <span class="k">if</span> <span class="n">it</span> \
<span class="n">does</span><span class="p">.</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">You can link to

 http://www.cmake.org/cmake/help/git-master/manual/cmake-packages.7.html

for upstream info on this.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">I guess \
http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules is the one to \
extend?</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2014, 3:56 p.m. UTC, <b>Stephen Kelly</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: \
4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line50" style="color: black; \
font-weight: bold; text-decoration: underline;">docs/writing-find-modules.md</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">50</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">If</span> <span \
class="n">there</span> <span class="n">are</span> <span class="n">imported</span> <span \
class="n">targets</span><span class="p">,</span> <span class="n">you</span> <span class="n">should</span> \
<span class="n">also</span> <span class="n">document</span> <span class="n">these</span></pre></td>  \
</tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">The imported targets should be the primary way of using the module. \
I don&#39;t think the _INCLUDES and _LIBRARIES etc variables should even be set if imported targets are \
provided.</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">Fair point, although for modules we&#39;ve previously \
provided, I&#39;m inclined to set them for ease of porting.</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2014, 3:56 p.m. UTC, <b>Stephen Kelly</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: \
4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line98" style="color: black; \
font-weight: bold; text-decoration: underline;">docs/writing-find-modules.md</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">98</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">message</span><span \
class="p">(</span><span class="n">AUTHOR_WARNING</span> <span class="s">&quot;Your project should require \
at least CMake 2.8.12 to use FindFoo.cmake&quot;</span><span class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">I don&#39;t think AUTHOR_WARNING is appropriate here. Why not \
WARNING?</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">Because it&#39;s a warning for authors (of project \
build scripts) rather than users (ie: those building the package).  I thought that was exactly what \
AUTHOR_WARNING was for...</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2014, 3:56 p.m. UTC, <b>Stephen Kelly</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: \
4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line145" style="color: \
black; font-weight: bold; text-decoration: underline;">docs/writing-find-modules.md</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">145</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">multiple</span> <span \
class="n">libraries</span><span class="p">;</span> <span class="k">with</span> <span class="n">one</span> \
<span class="n">library</span><span class="p">,</span> <span class="n">the</span> <span \
class="n">only</span> <span class="n">reason</span> <span class="k">is</span> <span class="n">to</span> \
<span class="n">make</span> <span class="n">the</span> <span class="n">various</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">Actually it&#39;s mostly important so that users can set it in the \
cache if they have the library in a non-predicted location.</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">Well, I meant the reason we set Foo_LIBRARY and then \
just set Foo_LIBRARIES to that same value, rather than using Foo_LIBRARIES directly.  But I guess I \
should talk about making the cache entries the user has to set consistent.</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2014, 3:56 p.m. UTC, <b>Stephen Kelly</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: \
4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line153" style="color: \
black; font-weight: bold; text-decoration: underline;">docs/writing-find-modules.md</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">153</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">you</span> <span \
class="n">can</span> <span class="n">use</span> <span class="n">that</span> <span \
class="n">information</span> <span class="n">to</span> <span class="n">set</span> <span \
class="err">`</span><span class="n">Foo_VERSION_STRING</span><span class="err">`</span><span \
class="p">.</span>  <span class="n">Otherwise</span><span class="p">,</span> <span \
class="n">attempt</span> <span class="n">to</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">Don&#39;t set Foo_VERSION_STRING, set Foo_VERSION. That is canonical \
because of config-file packages.</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">OK; I was following a pattern from other CMake scripts. \
Also, it is what http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules \
suggests.</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2014, 3:56 p.m. UTC, <b>Stephen Kelly</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: \
4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116025/diff/2/?file=246011#file246011line325" style="color: \
black; font-weight: bold; text-decoration: underline;">docs/writing-find-modules.md</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">325</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span \
class="n">INTERFACE_INCLUDE_DIRECTORIES</span> <span \
class="s">&quot;${Foo_${_comp}_INCLUDE_DIR}&quot;</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">Note that only build-properties of the target itself should be here. \
Not those of dependencies (if the dependency provides imported targets, which it should/must for this \
stuff to work). CMake will resolve that itself.</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">Are you saying that INTERFACE_INCLUDE_DIRECTORIES line \
is wrong?  Or that I should add a comment?</pre> <br />




<p>- Alex</p>


<br />
<p>On February 25th, 2014, 10:59 a.m. UTC, Alex Merry wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black solid;">  <tr>
  <td>

<div>Review request for Build System, Extra Cmake Modules and KDE Frameworks.</div>
<div>By Alex Merry.</div>


<p style="color: grey;"><i>Updated Feb. 25, 2014, 10:59 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
extra-cmake-modules
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid \
#b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Add documentation about writing find \
modules</pre>  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>README.md <span style="color: grey">(85b97b7fa003282e1eeb1113c4668a9b73e3f731)</span></li>

 <li>docs/writing-find-modules.md <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/116025/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic