<div dir="ltr">I don't think policies are sufficient.  I just tried using the new target_sources command that was introduced in CMake 3.1.0 in a CMakeLists.txt file that specified cmake_minimum_required(VERSION 3.0) and it didn't warn that the CMakeLists.txt file wouldn't work with CMake 3.0.  I think if you want to guarantee that it will work with CMake x.y then you must always use CMake x.y instead of using newer versions and hoping they will tell you if you have used something that won't work on the older version you require.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 July 2015 at 05:13, Stuermer, Michael  SP/HZA-ZSEP <span dir="ltr"><<a href="mailto:michael.stuermer@schaeffler.com" target="_blank">michael.stuermer@schaeffler.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have a look at cmake_minimum_required() and cmake_policy(). I think with these both it should be possible to verify you are using a cmake version that provides all features which are required by your project.<br>
<br>
See here:<br>
<br>
<a href="http://www.cmake.org/cmake/help/v3.3/command/cmake_minimum_required.html?#command:cmake_minimum_required" rel="noreferrer" target="_blank">http://www.cmake.org/cmake/help/v3.3/command/cmake_minimum_required.html?#command:cmake_minimum_required</a><br>
<br>
and here:<br>
<br>
<a href="http://www.cmake.org/cmake/help/v3.3/command/cmake_policy.html" rel="noreferrer" target="_blank">http://www.cmake.org/cmake/help/v3.3/command/cmake_policy.html</a><br>
<br>
best regards,<br>
Michael<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> -----Original Message-----<br>
> From: CMake [mailto:<a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a>] On Behalf Of Nicolas Bock<br>
> Sent: Wednesday, July 01, 2015 8:29 PM<br>
> To: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
> Subject: [CMake] warn if features used that require >cmake-x.y<br>
><br>
> Hi,<br>
><br>
> is there a way to get CMake to warn if a feature is used that requires<br>
> a cmake version greater than some version x.y?<br>
><br>
> Thanks,<br>
><br>
> nick<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:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For<br>
> 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/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/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/mailman/listinfo/cmake</a><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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/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/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/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>