Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using cmake with nmake x64

I use cmake to generate a NMake file, everything goes fine.

I use the x64 toolsets (without Visual Studio, only the SDK), so I type nmake, but it generate a x86 build and not a x64 build.

Do you know why ? and how to force nmake to target x64 ?

Thanks

like image 515
CDZ Avatar asked Feb 07 '18 10:02

CDZ


People also ask

Is CMake 32-bit?

CMake is software designed to automate compilation on various systems. We'll need both the make tool and a C or C++ compiler to build a project. As a result, we have a 32-bit executable program linked to a 32-bit C library.

What is nmake used for?

The Microsoft Program Maintenance Utility (NMAKE. EXE) is a command-line tool included with Visual Studio. It builds projects based on commands that are contained in a description file, usually called a makefile. NMAKE must run in a Developer Command Prompt window.


1 Answers

Just to share, use the following to force the x64 platform. Use this command prompt command.

VsDevCmd.bat -host_arch=amd64 -arch=amd64

Both -host_arch and -arch are mandatory !

like image 102
CDZ Avatar answered Sep 27 '22 03:09

CDZ