[Cmake-commits] CMake branch, next, updated. v2.8.7-3316-ge93b9ff

David Cole david.cole at kitware.com
Tue Mar 20 16:25:46 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e93b9ffc78a129b0acc9f57d7a68d04711fdd1fa (commit)
       via  a5ee62851973713e15147d046d7d0d4abcfdd078 (commit)
      from  6da315f20996c4a4f838269568af4c265f9cf04f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e93b9ffc78a129b0acc9f57d7a68d04711fdd1fa
commit e93b9ffc78a129b0acc9f57d7a68d04711fdd1fa
Merge: 6da315f a5ee628
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Tue Mar 20 16:25:44 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Mar 20 16:25:44 2012 -0400

    Merge topic 'fix-AllFindModules-version-check' into next
    
    a5ee628 Tests: Relax restrictions on version variable contents


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5ee62851973713e15147d046d7d0d4abcfdd078
commit a5ee62851973713e15147d046d7d0d4abcfdd078
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Tue Mar 20 16:18:02 2012 -0400
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Tue Mar 20 16:18:02 2012 -0400

    Tests: Relax restrictions on version variable contents
    
    Our only expectation of version number variables should be that
    they begin with a decimal digit for VERSION_LESS, VERSION_EQUAL
    and VERSION_GREATER comparison purposes. If people put extra
    blah blah after a version number like "1.2.3 (this is some super
    special extra information about our funky proprietary build of
    the official 1.2.3 release)" then we should be ok with that.
    
    So: now we have the following expectations for version number
    variable content for the purposes of the AllFindModules test:
    
     - it should start with a decimal digit (match "^[0-9]")
     - it should not be empty
     - it should not be VERSION_EQUAL 0
     - it should not be NOT VERSION_GREATER 0

diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
index 22b1b7b..6604208 100644
--- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -48,11 +48,21 @@ endif (NOT QT4_FOUND)
 macro(check_version_string MODULE_NAME VERSION_VAR)
     if (${MODULE_NAME}_FOUND)
         if (DEFINED ${VERSION_VAR})
-            if (NOT ${VERSION_VAR} MATCHES "^[0-9][0-9\\.]*[-A-Za-z_\\+]*[0-9\\.]*$")
-                message(SEND_ERROR "${VERSION_VAR} has unexpected content ${${VERSION_VAR}}")
+            message(STATUS "${VERSION_VAR}='${${VERSION_VAR}}'")
+            if (NOT ${VERSION_VAR} MATCHES "^[0-9]")
+                message(SEND_ERROR "unexpected: ${VERSION_VAR} does not begin with a decimal digit")
+            endif()
+            if ("${${VERSION_VAR}}" STREQUAL "")
+                message(SEND_ERROR "unexpected: ${VERSION_VAR} is empty")
+            endif()
+            if (${VERSION_VAR} VERSION_EQUAL 0)
+                message(SEND_ERROR "unexpected: ${VERSION_VAR} is VERSION_EQUAL 0")
+            endif()
+            if (NOT ${VERSION_VAR} VERSION_GREATER 0)
+                message(SEND_ERROR "unexpected: ${VERSION_VAR} is NOT VERSION_GREATER 0")
             endif()
         else()
-            message(SEND_ERROR "${MODULE_NAME}_FOUND is set but no version number is defined")
+            message(SEND_ERROR "${MODULE_NAME}_FOUND is set but version number variable ${VERSION_VAR} is NOT DEFINED")
         endif()
     endif ()
 endmacro(check_version_string)

-----------------------------------------------------------------------

Summary of changes:
 Tests/CMakeOnly/AllFindModules/CMakeLists.txt |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list