CMake (was More about x-packages)

Kai-Uwe Behrmann ku.b at gmx.de
Sun Dec 23 00:45:36 PST 2007


Am 22.12.07, 11:37 -0800 schrieb Alan W. Irwin:

> On 2007-12-22 10:09+0100 Kai-Uwe Behrmann wrote:
> 
> > CMake feels not like unix:
> > (1) no make uninstall target by default as with autotools
> > (2) no environment variables
> > (3) no config.site scripts(?)
> > (4) omitting the fun of posix scripting
> 
> These comments (which I have numbered for clarity) should be answered.
> 
> (1) is true, but see
> http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
> for an easy alternative using install_manifest.txt.

I'd emphasise 'by default' as we will see many projects comming witout a 
'uninstall' target much more potentially smearing the file system. With 
autotools one could almost rely on a cleaned system, of course with 
caution.

> (2) CMake has complete support for environment variables.  There are standard
> CMake-specific environment variables it interprets which are documented at
> http://www.cmake.org/Wiki/CMake_Useful_Variables  Furthermore, from within
> the CMake environment you can get and set arbitrary environment variables.

Ok, most variables you pointed out I'd consider useful are there. Still
I cant see a reason to omit the common place CC/CXX/CFLAGS/CXXFLAGS... 
variables.

> (3) Not sure exactly what you mean here, but you can tailor cmake to your
> exact needs using the cmake -C option.

Autoconf generated configure scripts support inclusion of a host site 
script to plug into the configure process. -C is leaving the established 
rule again, at least provides the same functionality.

> (4) You can specifically run any command you like (including shell scripts)
> at cmake (configuration) time using the execute_process CMake command.  As I
> noted before, full scripting is also available at build time from within the
> Makefile generated by CMake.

Oh my apologise, I had overseen this.

> > One question: What is the difference of installing Cmake in opposite to
> > MinGW in order to compile a software project?
> 
> MinGW with MSYS and MinGW without MSYS are two possible windows platforms.
> CMake can be used to help build software on both those platforms. Autotools
> can be used to build software on MinGW but MSYS is required in that case.

What is the advantage of CMake <-> autotools on MS systems? Just the 
nmake target for a expectedly cryptic, on the provided nmake side, 
compilation inside VC++?
Remembering the unix Makefiles, at least me would like to see a nmake 
example first before doing any testing.

Ok, with your arguments you gave, in my eyes, more of the hidden unix face 
back.

The order of magnitude speedup for CMake is a apple with oranges 
comparision.

What remains is a reported advantage over, in my eyes, obsolete libtool, 
with later harder debugging than autotools.

kind regards
Kai-Uwe Behrmann
--
developing for colour management 
www.behrmann.name + www.oyranos.org




More information about the xorg mailing list