Die GNU autotools

Die GNU autotools

Shlomi Fish shlomif at iglu.org.il
Tue Jan 11 12:03:27 IST 2011


On Monday 10 Jan 2011 16:36:34 Shachar Shemesh wrote:
> On 10/01/11 15:53, Shlomi Fish wrote:
> > {{{{
> > SET(LIBTCMALLOC_LIB_LIST)
> > 
> > IF (NOT CMAKE_BUILD_TYPE STREQUAL debug)
> > 
> >      IF (NOT FCS_AVOID_TCMALLOC)
> >      
> >          # Optionally link against Google's TCMalloc if it's available:
> >          # http://goog-perftools.sourceforge.net/
> >          # This gives better performance for the threaded programs.
> >          FIND_LIBRARY(LIBTCMALLOC_LIB tcmalloc)
> >          
> >          IF(LIBTCMALLOC_LIB STREQUAL "LIBTCMALLOC_LIB-NOTFOUND")
> >          
> >              # Do nothing.
> >          
> >          ELSE(LIBTCMALLOC_LIB STREQUAL "LIBTCMALLOC_LIB-NOTFOUND")
> >          
> >              # Cancelling for now to see if it helps with the valgrind
> >              problem. # TODO : restore
> >              SET(LIBTCMALLOC_LIB_LIST ${LIBTCMALLOC_LIB})
> >          
> >          ENDIF(LIBTCMALLOC_LIB STREQUAL "LIBTCMALLOC_LIB-NOTFOUND")
> >      
> >      ENDIF (NOT FCS_AVOID_TCMALLOC)
> > 
> > ENDIF (NOT CMAKE_BUILD_TYPE STREQUAL debug)
> > }}}}
> 
> You have certainly made me take back one claim I have made. CMake is not
> easier to learn, nor is the result more readable.

Oh great, another "I cannot understand Perl, so it must be unreadable"-like 
claim. I found CMake much easier to learn than the GNU Autotools even after I 
have learned Autotools. It took me about a week of playing around to write the 
first GNU Autotools-based build system for Freecell Solver, and many days 
afterwards of tweaking, fixing bugs and forward porting, while it took me a 
weekend to convert the build system to CMake without knowing CMake first. I 
can tell CMake is by far easier to learn than GNU's offering.

Regarding readability - yes, it tends to be verbose, but remember that you're 
uninitiated at reading CMake. I find what I wrote here perfectly readable, 
even without syntax highlighting and Vim does have syntax highlighting for 
CMake, which may help a little.

> 
> > FIND_LIBRARY has an equivalent in Autotools-land, and CMake can do all
> > that.
> 
> The question was not about functionality in CMake for which an
> equivalent autoconf functionality exists. The question was about the
> other way around.

Well, CMake has an equivalent for most Autoconf stuff, and if not, it can be 
written or found in third-party repositories.

> 
>  From your page:
> > CMake, on the other hand uses a custom syntax, which is consistent,
> > trustworthy, predictable and reliable. The fact that it isn't
> > "standard" does not make it bad.
> 
> Both M4 and bourne shell are Turing complete languages. Is CMake? If
> not, it is likely that not all conceivable tests can be written in it.
> 

CMake's custom language *is* Turing complete, yes. There are variables, 
conditionals, loops ("WHILE", "FOREACH", etc.), macros, functions, etc.

Regards,

	Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Escape from GNU Autohell - http://www.shlomifish.org/open-
source/anti/autohell/

Chuck Norris can make the statement "This statement is false" a true one.

Please reply to list if it's a mailing list post - http://shlom.in/reply .



More information about the Linux-il mailing list