[Cmake-commits] CMake branch, next, updated. v2.8.7-2171-g8a9d4a1

Rolf Eike Beer eike at sf-mail.de
Fri Jan 20 12:28:30 EST 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  8a9d4a172f0a245061bd0eb47b0005613d5fef56 (commit)
       via  2cf5df3e58842a3e0fdeb919414f32e53dbe0aec (commit)
      from  9f6bdd0708b0f6ac1a522905410b0f6ac293ce60 (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=8a9d4a172f0a245061bd0eb47b0005613d5fef56
commit 8a9d4a172f0a245061bd0eb47b0005613d5fef56
Merge: 9f6bdd0 2cf5df3
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 20 12:28:23 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 20 12:28:23 2012 -0500

    Merge topic 'flex-version' into next
    
    2cf5df3 FindFLEX: fix version parsing for old flex versions


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cf5df3e58842a3e0fdeb919414f32e53dbe0aec
commit 2cf5df3e58842a3e0fdeb919414f32e53dbe0aec
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 20 17:44:00 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Jan 20 18:27:43 2012 +0100

    FindFLEX: fix version parsing for old flex versions

diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index 6a70b40..6309bc9 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -91,8 +91,12 @@ IF(FLEX_EXECUTABLE)
       MESSAGE("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available")
     ENDIF()
   ELSE()
-    STRING(REGEX REPLACE "^flex (.*)$" "\\1"
+    # older versions of flex printed "/full/path/to/executable version X.Y"
+    # newer versions use "basename(executable) X.Y"
+    GET_FILENAME_COMPONENT(FLEX_EXE_NAME "${FLEX_EXECUTABLE}" NAME)
+    STRING(REGEX REPLACE "^.*${FLEX_EXE_NAME} (version )?([0-9]+[^ ]*)$" "\\2"
       FLEX_VERSION "${FLEX_version_output}")
+    UNSET(FLEX_EXE_NAME)
   ENDIF()
 
   #============================================================

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

Summary of changes:
 Modules/FindFLEX.cmake |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list