[CMake] Why would I be interested in Cmake over regular 'make'?

William A. Hoffman billlist at nycap.rr.com
Tue Apr 19 14:14:45 EDT 2005


CMake's main strength is build portability.  GNU make Makefiles often require a UNIX/POSIX 
environment to run in.  CMake uses the native tools, and other than requiring itself, does 
not require any additional tools to be installed.   The same cmake input files will build 
with GNU make, Visual studio 6,7,8 IDEs, borland make, nmake, and XCode.   So, developers are 
free to use the tools they are most productive with.   Some people like the Visual Studio 
IDE, some folks use nmake from the command line.  Others, never touch a windows box, but always 
develop on linux.   CMake allows groups like that to share a common source tree.  Another key
feature of CMake is the try compile/try run commands.  These allow for software to be 
developed for the canonical system instead of specific  systems.  For example, instead of 

#ifdef HPUX
... 
#endif

you can say:

#ifdef HAS_FEATURE_A  
...
#endif

Where HAS_FEATURE_A is computed by cmake using the compiler and system as it currently is, 
not as it was when you wrote the code the first time.  

Another big feature of CMake is the ability to combine packages.   CMake can find
installed software and easily compile and link to other packages.   For example, with a very
short CMake input file, you can find and link to VTK and ITK, and CMake will construct
all the correct -I, -L and -l compiler and link lines, and all of this works on windows,
unix, and mac.

I am sure there are other benefits as well.

 
-Bill


At 01:50 PM 4/19/2005, Matt England wrote:
>Hello,
>
>I'm new to this community, and I'm sure this is a FAQ, but I looked all over the website and have yet to find an explicit answer to this question:
>
>Why would I be interesed in Cmake over just using my standard Makefiles with GNU's make?
>
>I write a lot of complex, powerful Makefiles, and I don't yet see a need to change.  My group has also used some of the auto-build/makefile-generation stuff in Eclipse, with varying success.
>
>I'm basically asking:  what makes Cmake special?  What can it do that the others can't?
>
>I'm not all that thrilled about GUI front ends (it's nice, but it doesn't seem to do much for me), so I'm looking for more "substance," if you will.
>
>I would think every software-build-manager would have the same question(s)...?
>
>-Matt
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list