From 16c6dcb34c39359ece87097b30ede20cb69ee35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Sat, 30 Jun 2012 17:06:35 +0200 Subject: [PATCH] ruby: replace puts with print in FindRuby.cmake --- cmake/FindRuby.cmake | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/cmake/FindRuby.cmake b/cmake/FindRuby.cmake index 529278003..13d45f3c9 100644 --- a/cmake/FindRuby.cmake +++ b/cmake/FindRuby.cmake @@ -38,37 +38,30 @@ FIND_PROGRAM(RUBY_EXECUTABLE IF(RUBY_EXECUTABLE) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['rubyhdrdir'] || RbConfig::CONFIG['archdir']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir'] || RbConfig::CONFIG['archdir']" OUTPUT_VARIABLE RUBY_ARCH_DIR ) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['arch']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['arch']" OUTPUT_VARIABLE RUBY_ARCH ) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['libdir']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['libdir']" OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH ) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['rubylibdir']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubylibdir']" OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH ) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['ruby_version']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['ruby_version']" OUTPUT_VARIABLE RUBY_VERSION ) - # remove the new lines from the output by replacing them with empty strings - STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}") - STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}") - STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}") - STRING(REPLACE "\n" "" RUBY_ARCH "${RUBY_ARCH}") - STRING(REPLACE "\n" "" RUBY_VERSION "${RUBY_VERSION}") - FIND_PATH(RUBY_INCLUDE_PATH NAMES ruby.h PATHS ${RUBY_ARCH_DIR}