[CMake] cmake 32/64 bit

Jörg F. Unger joergfunger at googlemail.com
Mon Apr 23 10:29:37 EDT 2012


2012/4/23 Brad King <brad.king at kitware.com>

> On Mon, Apr 23, 2012 at 4:45 AM, Jörg F. Unger
> <joergfunger at googlemail.com> wrote:
> > Hi everyone,
> > I'm using windows 7 (64). I'm trying to determine the python installation
> > using cmake.
> > The problem is that cmake only exists as a 32 bit application. As a
> > consequence, it has only access to the 32 bit registry entries (WOW64). I
> > have installed python as a 64 bit application, which is not listed in
> the 32
> > bit registry.
> >
> > By accessing
> >
> HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath
> >
> > in the FinPythonLibs.cmake as the path, the 32 bit cmake does not find a
> > python installation. Unfortunately, there is also no possibility to set
> the
> > variables (PYTHON_LIBRARY PYTHON_INCUDE_DIR) manually. If I manually add
> in
> > the 32 bit registry the 64 bit application (python), everything works,
> > though this is just something I did to locate the problem, not a
> permanent
> > solution.
> >
> > Any ideas how to circumvent these problems? Or is there a way to build a
> 64
> > bit cmake?
>
> At the point when you call find_package(PythonLibs) make sure you have
> at least one language enabled.  That way CMake knows the address size
> of the toolchain's target format.  That is important when searching so
> CMake knows which registry view to use:
>
>
> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmFindCommon.cxx;hb=v2.8.8#l381
>
> Note that the PlatformIs64Bit test is here:
>
>
> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefile.cxx;hb=v2.8.8#l2195
>
> -Brad
>

I've tried to test this using

PROJECT(NuTo CXX C Fortran)
MESSAGE(STATUS "CMAKE_SIZEOF_VOID_P  ${CMAKE_SIZEOF_VOID_P}")

which gives 4. The problem is that I installed the 32bit version of MinGW.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120423/e10bcdfd/attachment.htm>


More information about the CMake mailing list