<div class="gmail_extra"><div class="gmail_quote">2012/4/23 Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Apr 23, 2012 at 4:45 AM, Jörg F. Unger<br>
<<a href="mailto:joergfunger@googlemail.com">joergfunger@googlemail.com</a>> wrote:<br>
> Hi everyone,<br>
> I'm using windows 7 (64). I'm trying to determine the python installation<br>
> using cmake.<br>
> The problem is that cmake only exists as a 32 bit application. As a<br>
> consequence, it has only access to the 32 bit registry entries (WOW64). I<br>
> have installed python as a 64 bit application, which is not listed in the 32<br>
> bit registry.<br>
><br>
> By accessing<br>
> HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath<br>
><br>
> in the FinPythonLibs.cmake as the path, the 32 bit cmake does not find a<br>
> python installation. Unfortunately, there is also no possibility to set the<br>
> variables (PYTHON_LIBRARY PYTHON_INCUDE_DIR) manually. If I manually add in<br>
> the 32 bit registry the 64 bit application (python), everything works,<br>
> though this is just something I did to locate the problem, not a permanent<br>
> solution.<br>
><br>
> Any ideas how to circumvent these problems? Or is there a way to build a 64<br>
> bit cmake?<br>
<br>
At the point when you call find_package(PythonLibs) make sure you have<br>
at least one language enabled. That way CMake knows the address size<br>
of the toolchain's target format. That is important when searching so<br>
CMake knows which registry view to use:<br>
<br>
<a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmFindCommon.cxx;hb=v2.8.8#l381" target="_blank">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmFindCommon.cxx;hb=v2.8.8#l381</a><br>
<br>
Note that the PlatformIs64Bit test is here:<br>
<br>
<a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefile.cxx;hb=v2.8.8#l2195" target="_blank">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefile.cxx;hb=v2.8.8#l2195</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-Brad<br>
</font></span></blockquote></div><br>I've tried to test this using<br><br>PROJECT(NuTo CXX C Fortran)<br>MESSAGE(STATUS "CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P}")<br><br>which gives 4. The problem is that I installed the 32bit version of MinGW.<br>
</div>