<div dir="ltr">+1 for me too - sometime ago a college of mine spend quite some time to figure why he couldn't bootstrap our application - turns out he was using an (old) CMake version which didn't know about the 'continue' command. The error-messages coming out of CMake sometimes help, but more often don't really give the correct hint, unless you happen to be one of the local CMake gurus. <div><br></div><div>Sincerely,</div><div>Jakob</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 8, 2016 at 10:33 PM, Craig Scott <span dir="ltr"><<a href="mailto:craig.scott@crascit.com" target="_blank">craig.scott@crascit.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Rather than trying to do everything, perhaps there's value in tackling this in stages. At a high level, simply knowing in which CMake version a particular command, property, variable or module was added is a good start. From there, if a command, etc. gained new options, then a note could be added with the text specific to that option to indicate when it was added. Obviously the more fine grained you go, the more time consuming and onerous it would become, but how about just starting with the coarse level? That already provides a big improvement over the current alternative of wading through past versions of documentation and/or source code.<div><br></div><div>I'd also recommend that such version details be part of the actual CMake docs. While the separate compatibility matrix on the wiki is/was a useful resource, by not having it part of the CMake sources/docs, it is inherently a separate effort to try to keep it up to date with each CMake release. Making it part of CMake itself would seem to encourage documenting version details as part of the same merge requests, etc. that add/change things.</div><div><br></div><div>I'll go out on a limb here and suggest that if a clear guideline was given for <i>how</i> version details should be documented, then the community itself would likely work towards populating that information over time. I don't think there is a (realistic) expectation that Kitware would do all the heavy lifting here.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Nov 9, 2016 at 8:23 AM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>2016-11-08 20:26 GMT+01:00 Albrecht Schlosser <span dir="ltr"><<a href="mailto:AlbrechtS.fltk@online.de" target="_blank">AlbrechtS.fltk@online.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_1967766174557924544m_-6727968448506919063gmail-">On 08.11.2016 15:22 Nils Gladitz wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 11/08/2016 03:11 PM, Dvir Yitzchaki wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
But how do you know which version to declare on cmake_minimum_required?<br>
If this feature will be added it won't be far from writing a script<br>
that scans the commands you use and outputs the first appropriate<br>
version.<br>
</blockquote></blockquote>
<br></span>
I'd also like such an addition to the documentation for reasons discussed below.</blockquote><div><br></div><div><br></div></span><div>I think the need is recognized by most CMake user but...</div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_1967766174557924544m_-6727968448506919063gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Strictly speaking cmake_minimum_required(VERSION<wbr>) is not about command<br>
availability but rather about behavior (cmake policies).<br>
</blockquote></span>
[...]<span class="m_1967766174557924544m_-6727968448506919063gmail-"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I'd start by requesting the highest possible version I could justify<br>
(e.g. based on availability on target platforms and user convenience)<br>
and then start from there.<br>
</blockquote>
<br></span>
And that's exactly the (my) point. How can I find out the "highest possible version I could justify"?<br>
<br>
I'm a developer of a public GUI library (FLTK). In this position you don't know anything about the availability of CMake versions on your target platforms. Our intention is to keep cmake_minimum_required() as low as possible.<br>
<br>
That said, whenever you change a CMakeLists.txt file you should be aware if the commands you use are compatible with the CMake version you "require". There should be an easy way to find out in which version a particular CMake command has been introduced. Only with this information you can decide if you should use this fine command or better find another way to do the task you're going to do.<br>
<br>
I'd like to have a list of release dates (I'm not sure if there is one) as well as the exact version a feature was introduced to write CMakeLists.txt files that run on really old CMake versions</blockquote><div><br></div></span><div>Some time ago people came up (dig the ML for the related discussion) with compatibility matrix idea:</div><div><a href="https://cmake.org/Wiki/CMake_Version_Compatibility_Matrix" target="_blank">https://cmake.org/Wiki/CMake_V<wbr>ersion_Compatibility_Matrix</a><br></div><div><a href="http://public.kitware.com/pipermail/cmake/2010-December/041202.html" target="_blank">http://public.kitware.com/pipe<wbr>rmail/cmake/2010-December/0412<wbr>02.html</a><br></div><div><br></div><div>And it finally ends with cmake 3.0.0</div><div><a href="http://public.kitware.com/pipermail/cmake/2015-March/059983.html" target="_blank">http://public.kitware.com/pipe<wbr>rmail/cmake/2015-March/059983.<wbr>html</a><br></div><div> </div><div>Note that this is far more complicated than simply listing when one command appears because some command may get more options, or change their default semantic</div><div>(using POLICY etc..) so the feature granularity leads to question like</div><div><br></div><div>When did the 'string' cmake command support the UUID argument ?</div><div><br></div><div>Before which version of CMake does get_target_property accept  non-existent target argument without issuing any error or warning ?</div><div>(see POLICY CMP0045)</div><div><br></div><div>So basically, tracking all kind of behavior change is not as easy as it seems.</div><div><br></div><div>How can we document the changes ? Or better extract them from the code or documentation?</div><span class="m_1967766174557924544HOEnZb"><font color="#888888"><div><br></div></font></span></div><span class="m_1967766174557924544HOEnZb"><font color="#888888">-- <br><div class="m_1967766174557924544m_-6727968448506919063gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</font></span></div></div>
<br></div></div><span class="">--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/cmake</a><br></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_1967766174557924544gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</font></span></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br></blockquote></div><br></div>