[CMake] NMake Generation Error: machine type 'X86' conflicts with target machine type 'x64'

Aaron_Wright at selinc.com Aaron_Wright at selinc.com
Fri Nov 13 11:21:51 EST 2009


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?
---------------------------------------------------------
Aaron Wright



Aaron Wright/SEL 
11/12/2009 02:36 PM

To
CMake <cmake at cmake.org>
cc

Subject
NMake Generation Error: machine type 'X86' conflicts with target machine 
type 'x64'





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,

cmake -G "NMake Makefiles" ..

and I get:

CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj : fatal error LNK1112:
module machine type 'X86' conflicts with target machine type 'x64'

My CMakeOutput.log files says:

The system is: Windows - 5.1 - x86
Determining if this is a 64 bit system passed:
CreateProcessError: The system cannot find the file specified.


for command: cl /nologo "C:\Program Files\CMake 
2.6\share\cmake-2.6\Modules\CMakeTestForFreeVC.cxx" /link /machine:i386 
in dir: X:/dcs/components/directory/nmake_build/CMakeFiles/CMakeTmp3

Compiling the C compiler identification source file "CMakeCCompilerId.c" 
succeeded.
Compiler: C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl.exe 
Build flags: ;/DWIN32;/D_WINDOWS;/W3;/Zm1000
Id flags: 

The output was:
0
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 
80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

Which seems pretty x86 to me. Where is this x64 coming from?

I'm using a Visual Studio 9 2008 Express command prompt.
--------------------------------------------------------
Aaron Wright

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091113/d07f77b8/attachment.htm>


More information about the CMake mailing list