diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-27 18:33:59 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-27 18:33:59 -0600 |
commit | 45d6980ff93d5e0340cb030529d764557fb9abe0 (patch) | |
tree | baba78b73e0e51b6c1d69b9b405b1cbf132246da /cmakemodules/MacroEnsureVersion.cmake | |
parent | 50368d5b4cb41375fdde0bc8d189034b36347a20 (diff) | |
download | tdesvn-45d6980ff93d5e0340cb030529d764557fb9abe0.tar.gz tdesvn-45d6980ff93d5e0340cb030529d764557fb9abe0.zip |
Cleanup
Diffstat (limited to 'cmakemodules/MacroEnsureVersion.cmake')
-rw-r--r-- | cmakemodules/MacroEnsureVersion.cmake | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/cmakemodules/MacroEnsureVersion.cmake b/cmakemodules/MacroEnsureVersion.cmake deleted file mode 100644 index 091152d..0000000 --- a/cmakemodules/MacroEnsureVersion.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# LGPL-v2, David Faure -# -# This macro compares version numbers of the form "x.y.z" -# MACRO_ENSURE_VERSION( ${FOO_MIN_VERSION} ${FOO_VERSION_FOUND} FOO_VERSION_OK) -# will set FOO_VERSIN_OK to true if FOO_VERSION_FOUND >= FOO_MIN_VERSION -# -MACRO(MACRO_ENSURE_VERSION requested_version found_version var_too_old) - - # parse the parts of the version string - STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_major_vers "${requested_version}") - STRING(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_minor_vers "${requested_version}") - STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_patch_vers "${requested_version}") - - STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" found_major_vers "${found_version}") - STRING(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" found_minor_vers "${found_version}") - STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" found_patch_vers "${found_version}") - - # compute an overall version number which can be compared at once - MATH(EXPR req_vers_num "${req_major_vers}*10000 + ${req_minor_vers}*100 + ${req_patch_vers}") - MATH(EXPR found_vers_num "${found_major_vers}*10000 + ${found_minor_vers}*100 + ${found_patch_vers}") - - if (found_vers_num LESS req_vers_num) - set( ${var_too_old} FALSE ) - else (found_vers_num LESS req_vers_num) - set( ${var_too_old} TRUE ) - endif (found_vers_num LESS req_vers_num) - -ENDMACRO(MACRO_ENSURE_VERSION) |