<div class="gmail_extra"><div class="gmail_quote">2012/4/23 Brad King <span dir="ltr">&lt;<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>&gt;</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>
&lt;<a href="mailto:joergfunger@googlemail.com">joergfunger@googlemail.com</a>&gt; wrote:<br>
&gt; Hi everyone,<br>
&gt; I&#39;m using windows 7 (64). I&#39;m trying to determine the python installation<br>
&gt; using cmake.<br>
&gt; The problem is that cmake only exists as a 32 bit application. As a<br>
&gt; consequence, it has only access to the 32 bit registry entries (WOW64). I<br>
&gt; have installed python as a 64 bit application, which is not listed in the 32<br>
&gt; bit registry.<br>
&gt;<br>
&gt; By accessing<br>
&gt; HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath<br>
&gt;<br>
&gt; in the FinPythonLibs.cmake as the path, the 32 bit cmake does not find a<br>
&gt; python installation. Unfortunately, there is also no possibility to set the<br>
&gt; variables (PYTHON_LIBRARY PYTHON_INCUDE_DIR) manually. If I manually add in<br>
&gt; the 32 bit registry the 64 bit application (python), everything works,<br>
&gt; though this is just something I did to locate the problem, not a permanent<br>
&gt; solution.<br>
&gt;<br>
&gt; Any ideas how to circumvent these problems? Or is there a way to build a 64<br>
&gt; 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&#39;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&#39;ve tried to test this using<br><br>PROJECT(NuTo CXX C Fortran)<br>MESSAGE(STATUS &quot;CMAKE_SIZEOF_VOID_P  ${CMAKE_SIZEOF_VOID_P}&quot;)<br><br>which gives 4. The problem is that I installed the 32bit version of MinGW.<br>
</div>