diff options
author | Brad King <brad.king@kitware.com> | 2003-02-14 02:57:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-02-14 02:57:05 (GMT) |
commit | 1fe42129d43d659f33ed72e63c26e7c9f8cf64d9 (patch) | |
tree | 14e46cb1e8dbb31338cf4fa0ed6f937a218ccb9c /configure.in | |
parent | 170fe935d2cdcbfd02e4385a3ca5abf3bf4b4192 (diff) | |
download | CMake-1fe42129d43d659f33ed72e63c26e7c9f8cf64d9.zip CMake-1fe42129d43d659f33ed72e63c26e7c9f8cf64d9.tar.gz CMake-1fe42129d43d659f33ed72e63c26e7c9f8cf64d9.tar.bz2 |
ENH: Centralized setting of CMake version number to top-level CMake listfile.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 8a95c98..e5eda4a 100644 --- a/configure.in +++ b/configure.in @@ -30,6 +30,18 @@ CXXFLAGS=$save_CXXFLAGS AC_SUBST(CMAKE_ROOT_DIR) +# Parse the cmake version number out of the top-level CMake listfile. +[ +CMake_VERSION_MAJOR=`cat $fullSrcDir/CMakeLists.txt | sed -n '/SET *( *CMake_VERSION_MAJOR/ {s/.*MAJOR *\([0-9][0-9]*\).*/\1/;p;}'` +CMake_VERSION_MINOR=`cat $fullSrcDir/CMakeLists.txt | sed -n '/SET *( *CMake_VERSION_MINOR/ {s/.*MINOR *\([0-9][0-9]*\).*/\1/;p;}'` +CMake_VERSION_PATCH=`cat $fullSrcDir/CMakeLists.txt | sed -n '/SET *( *CMake_VERSION_PATCH/ {s/.*PATCH *\([0-9][0-9]*\).*/\1/;p;}'` +] +AC_DEFINE_UNQUOTED(CMake_VERSION_MAJOR, ${CMake_VERSION_MAJOR}) +AC_DEFINE_UNQUOTED(CMake_VERSION_MINOR, ${CMake_VERSION_MINOR}) +AC_DEFINE_UNQUOTED(CMake_VERSION_PATCH, ${CMake_VERSION_PATCH}) +AC_SUBST(CMake_VERSION_MAJOR) +AC_SUBST(CMake_VERSION_MINOR) +AC_SUBST(CMake_VERSION_PATCH) # Step 1: set the variable "system" to hold the name and version number # for the system. This can usually be done via the "uname" command, but |