CMake/Tests/CMakeTests/VersionTest.cmake.in
Brad King 98c51ff6dc ENH: Overhaul CMake version numbering
This moves the version numbers into an isolated configured header so
that not all of CMake needs to rebuild when the version changes.

Previously we had spaces, dashes and/or the word 'patch' randomly chosen
before the patch number.  Now we always report version numbers in the
traditional format "<major>.<minor>.<patch>[-rc<rc>]".

We still use odd minor numbers for development versions.  Now we also
use the CCYYMMDD date as the patch number of development versions, thus
allowing tests for exact CMake versions.
2009-03-05 15:17:07 -05:00

10 lines
298 B
CMake

set(min_ver 2.7.20090305)
cmake_minimum_required(VERSION ${min_ver})
if("${CMAKE_VERSION}" VERSION_LESS "${min_ver}")
message(FATAL_ERROR
"CMAKE_VERSION=[${CMAKE_VERSION}] is less than [${min_ver}]")
else()
message("CMAKE_VERSION=[${CMAKE_VERSION}] is not less than [${min_ver}]")
endif()