[Cmake-commits] CMake branch, next, updated. v2.8.7-2328-g69d8b72

Rolf Eike Beer eike at sf-mail.de
Fri Jan 27 16:38:42 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  69d8b72746c407c0133df973c3bcbb52ac228e66 (commit)
       via  298cfd84d15bf6f17e0922635fe7adee4797041c (commit)
      from  a94ceed42658e2dd3e4c8b7c09860bee819b15dc (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=69d8b72746c407c0133df973c3bcbb52ac228e66
commit 69d8b72746c407c0133df973c3bcbb52ac228e66
Merge: a94ceed 298cfd8
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 27 16:38:41 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 27 16:38:41 2012 -0500

    Merge topic 'improve-findgnuplot' into next
    
    298cfd8 FindGnuplot: add version selection


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=298cfd84d15bf6f17e0922635fe7adee4797041c
commit 298cfd84d15bf6f17e0922635fe7adee4797041c
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 27 22:36:37 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Jan 27 22:36:37 2012 +0100

    FindGnuplot: add version selection

diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake
index 7c59f03..f066ee7 100644
--- a/Modules/FindGnuplot.cmake
+++ b/Modules/FindGnuplot.cmake
@@ -29,13 +29,26 @@ FIND_PROGRAM(GNUPLOT_EXECUTABLE
   ${CYGWIN_INSTALL_PATH}/bin
 )
 
+IF (GNUPLOT_EXECUTABLE)
+    EXECUTE_PROCESS(COMMAND "${GNUPLOT_EXECUTABLE}" --version
+                  OUTPUT_VARIABLE GNUPLOT_OUTPUT_VARIABLE
+                  ERROR_QUIET
+                  OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+    STRING(REGEX REPLACE "^gnuplot ([0-9\\.]+)( patchlevel )?" "\\1." GNUPLOT_VERSION_STRING "${GNUPLOT_OUTPUT_VARIABLE}")
+    STRING(REGEX REPLACE "\\.$" "" GNUPLOT_VERSION_STRING "${GNUPLOT_VERSION_STRING}")
+    UNSET(GNUPLOT_OUTPUT_VARIABLE)
+ENDIF()
+
 # for compatibility
 SET(GNUPLOT ${GNUPLOT_EXECUTABLE})
 
 # handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if 
 # all listed variables are TRUE
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot DEFAULT_MSG GNUPLOT_EXECUTABLE)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot
+                                  REQUIRED_VARS GNUPLOT_EXECUTABLE
+                                  VERSION_VAR GNUPLOT_VERSION_STRING)
 
 MARK_AS_ADVANCED( GNUPLOT_EXECUTABLE )
 

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

Summary of changes:
 Modules/FindGnuplot.cmake |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list