summaryrefslogtreecommitdiff
path: root/Modules/FindRuby.cmake
diff options
context:
space:
mode:
authorDavid Coppa <dcoppa@gmail.com>2015-01-12 19:28:02 +0100
committerRolf Eike Beer <eike@sf-mail.de>2015-01-12 19:28:02 +0100
commitdd5d2eb156b7e45ded53f694a12a1e00d19f6cd6 (patch)
treeb946f3e17a0d84d67da0bc3d273bb2933f6a20a1 /Modules/FindRuby.cmake
parentca5fe169aa4873af5b1ba4c6b2ecb35b84364974 (diff)
downloadcmake-dd5d2eb156b7e45ded53f694a12a1e00d19f6cd6.tar.gz
FindRuby: fix selection of version x.0 (#15345)
When "Ruby_FIND_VERSION_MINOR" is 0, the "if(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)" check evaluated to false.
Diffstat (limited to 'Modules/FindRuby.cmake')
-rw-r--r--Modules/FindRuby.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index b5ac703cf9..61858aa215 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -58,7 +58,7 @@
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)
+if(DEFINED Ruby_FIND_VERSION_MAJOR AND DEFINED 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