[CMake] cmake version/feature detection

Glenn Coombs glenn.coombs at gmail.com
Thu Aug 7 03:32:59 EDT 2014


If you know which version of cmake first introduced the feature you want to
check for then you could base your decision on the values of these 3 cmake
variables:

CMAKE_MAJOR_VERSION
CMAKE_MINOR_VERSION
CMAKE_PATCH_VERSION

--
Glenn



On 5 August 2014 04:30, Leif Walsh <leif.walsh at gmail.com> wrote:

> Hi,
>
> I'm wondering what is the best way to do feature detection or version
> checking of cmake itself, in cmake.  In particular, I'd like to check for
> the OBJECT library feature and either use it or fall back to our current
> mechanism if we're using an older cmake.
>
> --
> Cheers,
> Leif
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140807/73e70938/attachment.html>


More information about the CMake mailing list