<br><font size=2 face="sans-serif">I've tried this on several machines
and CMake always seems to think the box is x64 even though it clearly says
it's x86. I can fix the problem by deleting CMakeCache.txt and running
CMake again, which is weird. I'm trying to automate the whole thing in
a night build script so this behavior is not helpful. Ideas?</font>
<br><font size=2 face="sans-serif">---------------------------------------------------------<br>
Aaron Wright</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Aaron Wright/SEL</b> </font>
<p><font size=1 face="sans-serif">11/12/2009 02:36 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">CMake <cmake@cmake.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">NMake Generation Error: machine type
'X86' conflicts with target machine type 'x64'</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br><font size=2 face="sans-serif">I'm trying to use nmake to build a simple
library, but cmake seems to have a problem figuring out if my machine is
x86 or x64. For example, I run,</font>
<br>
<br><font size=2 face="Terminal">cmake -G "NMake Makefiles" ..</font>
<br>
<br><font size=2 face="sans-serif">and I get:</font>
<br>
<br><font size=2 face="Terminal">CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj
: fatal error LNK1112:</font>
<br><font size=2 face="Terminal">module machine type 'X86' conflicts with
target machine type 'x64'</font>
<br>
<br><font size=2 face="sans-serif">My CMakeOutput.log files says:</font>
<br>
<br><font size=2 face="Terminal">The system is: Windows - 5.1 - x86</font>
<br><font size=2 face="Terminal">Determining if this is a 64 bit system
passed:</font>
<br><font size=2 face="Terminal">CreateProcessError: The system cannot
find the file specified.</font>
<br>
<br>
<br><font size=2 face="Terminal">for command: cl /nologo "C:\Program
Files\CMake 2.6\share\cmake-2.6\Modules\CMakeTestForFreeVC.cxx" /link
/machine:i386 </font>
<br><font size=2 face="Terminal">in dir: X:/dcs/components/directory/nmake_build/CMakeFiles/CMakeTmp3</font>
<br>
<br><font size=2 face="Terminal">Compiling the C compiler identification
source file "CMakeCCompilerId.c" succeeded.</font>
<br><font size=2 face="Terminal">Compiler: C:/Program Files/Microsoft Visual
Studio 9.0/VC/bin/cl.exe </font>
<br><font size=2 face="Terminal">Build flags: ;/DWIN32;/D_WINDOWS;/W3;/Zm1000</font>
<br><font size=2 face="Terminal">Id flags: </font>
<br>
<br><font size=2 face="Terminal">The output was:</font>
<br><font size=2 face="Terminal">0</font>
<br><font size=2 face="Terminal">Microsoft (R) 32-bit C/C++ Optimizing
Compiler Version 15.00.30729.01 for 80x86</font>
<br><font size=2 face="Terminal">Copyright (C) Microsoft Corporation. All
rights reserved.</font>
<br>
<br><font size=2 face="sans-serif">Which seems pretty x86 to me. Where
is this x64 coming from?</font>
<br>
<br><font size=2 face="sans-serif">I'm using a Visual Studio 9 2008 Express
command prompt.</font>
<br><font size=2 face="sans-serif">--------------------------------------------------------<br>
Aaron Wright</font>
<br>
<br>