[cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows

Michael Smith michael.smith at puppetlabs.com
Fri Feb 6 18:00:50 EST 2015


Non-prefixed names shouldn't be used for 64-bit architectures. The only
major releases with 64-bit support are 2.0.0 and 2.1.5, and both use the
x64- prefix. New patch attached.

Follow-up question: Why doesn't FindRuby use Config::CONFIG['LIBRUBY'],
'LIBRUBY_A', 'LIBRUBY_SO' to search for libs? Ruby reports the name of its
libraries.

On Fri, Feb 6, 2015 at 12:33 PM, Brad King <brad.king at kitware.com> wrote:

> On 02/06/2015 03:29 PM, Michael Smith wrote:
> > The 64-bit ruby library names are:
> > * lib/libx64-mscvrt-ruby210-static.a
> > * lib/libx64-mscvrt-ruby210.dll.a
> > * bin/x64-mscvrt-ruby210.dll
> >
> > I've attached a patch that adds "x64-" prefixed lookup
>
> Thanks for working on this.  Some of the other find modules face
> similar situation.  In order to avoid finding 64-bit binaries
> when targeting a 32-bit architecture, use of such prefixes could
> be guarded by
>
>  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
>
> Please revise accordingly.  Also please check whether the
> non-prefixed names should ever be used for 64-bit architectures.
>
> Thanks,
> -Brad
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150206/6a343fac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-finding-64-bit-Ruby-with-FindRuby-on-Windows.patch
Type: application/octet-stream
Size: 1436 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150206/6a343fac/attachment.obj>


More information about the cmake-developers mailing list