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?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With