[Cmake-commits] CMake branch, next, updated. v3.1.0-1735-g29755e8

Brad King brad.king at kitware.com
Sun Jan 11 14:51:21 EST 2015


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  29755e8b9dec5b7ef9473b0ed17e6b0ac0606df6 (commit)
       via  802d0aa0b0a0af72fdc95bf1f69afeb362b6ef95 (commit)
      from  78bb45601fe03f041adcac56e98acac7b82213a7 (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=29755e8b9dec5b7ef9473b0ed17e6b0ac0606df6
commit 29755e8b9dec5b7ef9473b0ed17e6b0ac0606df6
Merge: 78bb456 802d0aa
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sun Jan 11 14:51:20 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 11 14:51:20 2015 -0500

    Merge topic 'FindRuby-fix-version' into next
    
    802d0aa0 FindRuby: Fix output check in _RUBY_CONFIG_VAR


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=802d0aa0b0a0af72fdc95bf1f69afeb362b6ef95
commit 802d0aa0b0a0af72fdc95bf1f69afeb362b6ef95
Author:     Evangelos Foutras <evangelos at foutrelis.com>
AuthorDate: Mon Dec 29 19:02:04 2014 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sun Jan 11 14:49:51 2015 -0500

    FindRuby: Fix output check in _RUBY_CONFIG_VAR
    
    Since commit v2.8.8~173^2 (FindRuby: clean up querying variables from
    Ruby, 2012-02-17) we query RbConfig::CONFIG first and, if the command
    fails or its output equates to a false constant, then fall back to
    querying Config::CONFIG.
    
    Due to the above, an error condition exists with Ruby 2.2.0; when
    querying RbConfig::CONFIG['TEENY'], the output of '0' will be discarded
    since it matches the false constant '0'.
    
    In previous versions this wasn't a problem, but Ruby 2.2 has completely
    removed Config::CONFIG. This causes RUBY_VERSION_PATCH to be set to an
    empty string and the Ruby version to be detected as '2.2.' (instead of
    '2.2.0').
    
    Fix the output check to explicitly look for an empty string before using
    the fallback query method. (Someone more familiar with Ruby might be
    able to deem the fallback as unnecessary and fully remove it.)

diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index b5ac703..0950d15 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -90,7 +90,7 @@ if(RUBY_EXECUTABLE  AND NOT  RUBY_VERSION_MAJOR)
       RESULT_VARIABLE _RUBY_SUCCESS
       OUTPUT_VARIABLE _RUBY_OUTPUT
       ERROR_QUIET)
-    if(_RUBY_SUCCESS OR NOT _RUBY_OUTPUT)
+    if(_RUBY_SUCCESS OR _RUBY_OUTPUT STREQUAL "")
       execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['${RBVAR}']"
         RESULT_VARIABLE _RUBY_SUCCESS
         OUTPUT_VARIABLE _RUBY_OUTPUT

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

Summary of changes:
 Modules/FindRuby.cmake |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list