Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building 64bit application with makefiles using cmake-gui

Tags:

64-bit

cmake

When I run cmake-gui and hit configure, I can specify the generator for my project. I can choose Visual Studio solution, Eclipse, makefiles etc...

I am on 64bit system and want to build 64bit application. Till now, I used Visual Studio 10 Win64 generator to generate my solutions. No I want to (have to) build it with makefiles. But there is no options 32b/64b.

Are makefiles for 64bit build used by default (on 64b system) and for 32b only after using something like export CFLAGS=-m32 inside my cmake files?

like image 291
relaxxx Avatar asked Oct 11 '12 16:10

relaxxx


People also ask

Does CMake work with makefiles?

CMake is a generator of buildsystems. It can produce Makefiles, it can produce Ninja build files, it can produce KDEvelop or Xcode projects, it can produce Visual Studio solutions.

How do I run CMake-gui?

Run cmake-gui.exe, which should be in your Start menu under Program Files, there may also be a shortcut on your desktop, or if you built from source, it will be in the build directory. A GUI will appear similar to what is shown below. The top two entries are the source code and binary directories.

How do I change the generator in my CMake-gui?

You can use the -G option (generator). Something like cmake -G"Eclipse CDT4 - Unix Makefiles" . Try cmake --help to see all the options available in your machine.


1 Answers

Are makefiles for 64bit build used by default (on 64b system)

Right.

and for 32b only after using something like export CFLAGS=-m32 inside my cmake files?

Right. The relevant variable is called CMAKE_C_FLAGS though.

like image 66
arrowd Avatar answered Sep 24 '22 13:09

arrowd