Results 1 to 10 of 10

Thread: CMake vs Autotools

  1. #1
    Join Date
    Jun 2006
    Location
    Ottawa, ON
    Beans
    68
    Distro
    Kubuntu

    Question CMake vs Autotools

    Hello World,

    I've been using make/autotools for a couple of years now, and I feel quite comfortable using them. However, I'm starting to notice CMake, and recently learned that most (all?) of KDE moved to CMake.

    I'm curious to know if anyone has had any experience with CMake / autotools / makefiles, and what you have to say.

    J-F

  2. #2
    Join Date
    Apr 2008
    Location
    Vilnius, Lithuania
    Beans
    304
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: CMake vs Autotools

    I can say that it is annoying to learn new build systems. (sorry, OT)

  3. #3
    Join Date
    Jun 2006
    Location
    Ottawa, ON
    Beans
    68
    Distro
    Kubuntu

    Re: CMake vs Autotools

    Quote Originally Posted by Delever View Post
    I can say that it is annoying to learn new build systems. (sorry, OT)
    That was my first reactions

    I'm trying to keep an open mind.

  4. #4
    Join Date
    Feb 2007
    Beans
    23

    Re: CMake vs Autotools

    My only experience with CMake is wishing more people used it. I work on Linux and Windows machines, and trying to build third-party code natively on Windows is a huge pain using autotools. I think more and more projects are moving to CMake for this very reason (e.g. Trilinos).

  5. #5
    Join Date
    Apr 2005
    Beans
    849

    Re: CMake vs Autotools

    The makefiles generated with cmake actually has colors.

    Some people will tell you that cmake stands for cross compile make.
    This is not true, it stands for color make.

    If you are writing your program for one compiler one os.
    This funky color stuff will be the only real benifit.

    If you however plan to use a windows system with your program then cmake should have support for various versions for visual studio,
    which is the std on windows.

    There are currently no free c/c++ 64bit c/c++ compilers for windows other than the visual studio. And as far as I can tell the autotools build system requires the gnu tool chain, which is not available on 64bit windows.
    Running 8.10 on a lenovo 3000 n200!
    Fingerprint reader doesn't work.

  6. #6
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: CMake vs Autotools

    Quote Originally Posted by monkeyking View Post
    There are currently no free c/c++ 64bit c/c++ compilers for windows other than the visual studio. And as far as I can tell the autotools build system requires the gnu tool chain, which is not available on 64bit windows.
    That's not precisely true. As far as "free as in beer" is concerned, there's the "Borland C++ Compiler 5.5". Apart from that, you have the GNU toolchain available in Cygwin.

    If you've got relatively simple makefiles (i.e., you are just compiling code and no resource files or whatsoever) and you want to compile for both Windows and Linux, qmake might also be an option (although it is a little bit out-dated).

  7. #7
    Join Date
    Apr 2005
    Beans
    849

    Re: CMake vs Autotools

    Quote Originally Posted by Zugzwang View Post
    That's not precisely true. As far as "free as in beer" is concerned, there's the "Borland C++ Compiler 5.5". Apart from that, you have the GNU toolchain available in Cygwin.
    There exists no 64 version of cygwin.

    http://www.cygwin.com/faq/faq-nochun...what.supported
    Cygwin can be expected to run on all modern 32 bit versions of Windows, except Windows CE. This includes Windows 95/98/ME/NT/2000/XP/2003 and the WOW64 32 bit environment on released 64 bit versions of Windows. As far as we know no one is working on a native 64 bit version of Cygwin.
    There are also a nice sun studio compiler for c/c++ which is free as in beer and speach.
    But the problem is that autotools require a gnu tool chain,
    and that exists only as 32 bit on windows.
    So if you use autotools, there are no way to compile 64bit on windows.

    That is:
    It might be possible,
    but it is not supported,
    and definently not recommend for large deployments.
    Last edited by monkeyking; April 1st, 2009 at 01:14 PM.
    Running 8.10 on a lenovo 3000 n200!
    Fingerprint reader doesn't work.

  8. #8
    Join Date
    Sep 2007
    Beans
    2

    Re: CMake vs Autotools

    I use cmake in Debian to produce normal linux and win32 binary packages and .deb, .rpm, win32 setup packages with nsis of my little application (chessratingcalc.sourceforge.net). So far I am very satisfied with it. I have only one problem with the win32 setup, it doesn't create correct Start menu entry (application opens in console), but I am sure that this is my mistake. Now I plan to try cmake on ubuntu just to create deb packages for more popular ubuntu. I have never used autotools.

  9. #9
    Join Date
    Apr 2007
    Location
    Stockholm, Sweden
    Beans
    2,039

    Re: CMake vs Autotools

    Quote Originally Posted by monkeyking View Post
    There are currently no free c/c++ 64bit c/c++ compilers for windows other than the visual studio. And as far as I can tell the autotools build system requires the gnu tool chain, which is not available on 64bit windows.
    bs ftp://ftp.equation.com/gcc/gcc-4.5-20090521-64.exe
    nissband.com my post-metal/instrumental

  10. #10
    Join Date
    Jul 2008
    Location
    Dublin, Ireland
    Beans
    633
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: CMake vs Autotools

    We use CMake extensively for our cross-platform applications, and I must say that I even use it for simple test applications due to the simplicity of use.

    One of the great advantages we gain with CMake is that it can generate project files for different IDEs. I mostly develop with vi/make under linux and vi/make or xcode under macosx. Some coworkers prefere Eclipse-CDT or KDevelop in linux. With the appropriate 'generator' parameter, cmake will provide project files for each of those (and some other) IDEs.

    Last CMakeLists.txt file I created was for a simple boost:: program_options test, and the full contents are this:

    Code:
    add_executable( test test.cpp )
    target_link_libraries( test boost_program_options )
    As you see it is rather simple (trick, boost is installed in the system path, else there would be a couple more lines to request the cmake system to locate boost, add the include and library path directives).

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •