Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

which suits linux ? GNU make vs cmake vs codeblocks vs qmake

In front of me some different Technologies and I'm confused between them. GNU make, CMAKE, Qmake, Code::blocks methodology

Code::Blocks uses a custom build system, which stores its information in XML-based project files, but can optionally use external makefiles **says WIKI**

1- What's the difference between CMAKE and GNU MAKE ?

2- If I'm planning for long term relationship with linux what is the best for that ?

3- If I needed to cross-platform some apps, will I need the same technique ?

like image 803
Ismail Marmoush Avatar asked Oct 30 '10 20:10

Ismail Marmoush


People also ask

Is CMake better than Makefile?

So, what is the real difference? CMake is much more high-level. It's tailored to compile C++, for which you write much less build code, but can be also used for general purpose build. make has some built-in C/C++ rules as well, but they are useless at best.

When should I run CMake or make?

cmake is a system to generate make files based on the platform (i.e. CMake is cross platform) which you can then make using the generated makefiles. While make is you directly writing Makefile for a specific platform that you are working with. If your product is crossplatform, then cmake is a better choice over make .

What is CMake and GNU make?

CMake is used to generate a project, it does not compile nor create object files, but generates files that will be used by other softwares such as GNU make (GMake). It uses CMakeLists. txt files for configuration.

Is nmake compatible with make?

Glenn Fowler's nmake is unrelated to the Microsoft program of the same name. Its input is similar to Make, but not compatible.


2 Answers

CMake generates platform specific make files. So on Linux, it wil generate files for gnu make, on windows it can generate Visual Studio solutions.

There are some other good options to consider like scons and waf, they are both Python based, cross platform, and are much more pleasant to work with than GNU Make.

like image 99
mikerobi Avatar answered Nov 16 '22 03:11

mikerobi


CMake is a cross-platform wrapper around more traditional build systems. like make for linux and Visual Studio Solutions for windows.

"One nice feature of CMake is the ability to do out of source builds. That means you can make all your .o files and even the binary executables without cluttering up your source tree."

I found this tutorial very helpful.

like image 26
sali Avatar answered Nov 16 '22 04:11

sali