Re: [CMake] cmake version/feature detection

2014-08-07 Thread Leif Walsh
Thanks! On Thu, Aug 7, 2014 at 7:55 AM, David Cole wrote: > Specifically, for the OBJECT library feature, I figured out what > version of CMake introduced it like this: > > gitk -- Tests/ObjectLibrary/CMakeLists.txt > > leads to finding this first commit of that file: 69d3d183 [1] > > g

Re: [CMake] cmake version/feature detection

2014-08-07 Thread David Cole via CMake
Specifically, for the OBJECT library feature, I figured out what version of CMake introduced it like this: gitk -- Tests/ObjectLibrary/CMakeLists.txt leads to finding this first commit of that file: 69d3d183 [1] gitk 69d3d183 leads to b87d7a60 [2] (4 parent commits up) which introduced

Re: [CMake] cmake version/feature detection

2014-08-07 Thread Glenn Coombs
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 wrote: > Hi, > > I'm wonde

[CMake] cmake version/feature detection

2014-08-04 Thread Leif Walsh
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 ww