[Cmake-commits] CMake branch, next, updated. v2.8.7-2339-g666ffb4

Rolf Eike Beer eike at sf-mail.de
Sat Jan 28 04:28:10 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  666ffb4159849394276df187cf24a8a87e6dfbcc (commit)
       via  8a83853f5fe785f29f12fdffec98f01cb0598678 (commit)
      from  da5096f76cd28138f5fee83216e41ac61c05320f (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=666ffb4159849394276df187cf24a8a87e6dfbcc
commit 666ffb4159849394276df187cf24a8a87e6dfbcc
Merge: da5096f 8a83853
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sat Jan 28 04:28:08 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jan 28 04:28:08 2012 -0500

    Merge topic 'improve-findgnuplot' into next
    
    8a83853 FindGnuplot: add version selection


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a83853f5fe785f29f12fdffec98f01cb0598678
commit 8a83853f5fe785f29f12fdffec98f01cb0598678
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: Sat Jan 28 10:27:44 2012 +0100

    FindGnuplot: add version selection

diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake
index 7c59f03..3e36e4b 100644
--- a/Modules/FindGnuplot.cmake
+++ b/Modules/FindGnuplot.cmake
@@ -4,6 +4,7 @@
 #
 #  GNUPLOT_FOUND - system has Gnuplot
 #  GNUPLOT_EXECUTABLE - the Gnuplot executable
+#  GNUPLOT_VERSION_STRING - the version of Gnuplot found (since CMake 2.8.8)
 
 #=============================================================================
 # Copyright 2002-2009 Kitware, Inc.
@@ -29,13 +30,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:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list