[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2574-g65e7d1a

Rolf Eike Beer eike at sf-mail.de
Mon Mar 18 15:31:43 EDT 2013


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  65e7d1a891015a90ce057cb5c37b2bac3e3bc83a (commit)
       via  d7e05e4144e36e2e7ad2656aa86ea037677e72b3 (commit)
      from  f61b00cc4a2d3f6ea4441ec29e33db8e067ac212 (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=65e7d1a891015a90ce057cb5c37b2bac3e3bc83a
commit 65e7d1a891015a90ce057cb5c37b2bac3e3bc83a
Merge: f61b00c d7e05e4
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Mon Mar 18 15:31:41 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 18 15:31:41 2013 -0400

    Merge topic 'Ruby-version-selection' into next
    
    d7e05e4 FindRuby: improve version selection


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7e05e4144e36e2e7ad2656aa86ea037677e72b3
commit d7e05e4144e36e2e7ad2656aa86ea037677e72b3
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Mon Mar 18 20:17:08 2013 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Mon Mar 18 20:17:08 2013 +0100

    FindRuby: improve version selection
    
    This will stop e.g. looking for a ruby1.9 executable first if "1.8 EXACT" was
    given.

diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 119cb63..c02158f 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -46,15 +46,24 @@ set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby)
 # if 1.9 is required, don't look for ruby18 and ruby1.8, default to version 1.8
 if(Ruby_FIND_VERSION_MAJOR  AND  Ruby_FIND_VERSION_MINOR)
    set(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${RUBY_FIND_VERSION_MINOR}")
+   # we can't construct that if only major version is given
+   set(_RUBY_POSSIBLE_EXECUTABLE_NAMES
+       ruby${Ruby_FIND_VERSION_MAJOR}.${Ruby_FIND_VERSION_MINOR}
+       ruby${Ruby_FIND_VERSION_MAJOR}${Ruby_FIND_VERSION_MINOR}
+       ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
 else()
    set(Ruby_FIND_VERSION_SHORT_NODOT "18")
 endif()
 
-set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.9 ruby19)
+if(NOT Ruby_FIND_VERSION_EXACT)
+  list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby1.9 ruby19)
 
-# if we want a version below 1.9, also look for ruby 1.8
-if("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
-   set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.8 ruby18)
+  # if we want a version below 1.9, also look for ruby 1.8
+  if("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
+    list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby1.8 ruby18)
+  endif()
+
+  list(REMOVE_DUPLICATES _RUBY_POSSIBLE_EXECUTABLE_NAMES)
 endif()
 
 find_program(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})

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

Summary of changes:
 Modules/FindRuby.cmake |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list