Make systems for the sane

Jeff Cobb <[email protected]>
Newsgroups gmane.comp.gnome.multimedia
Message-ID <1286327174.1752.11.camel@minotaur>
Greetings;
I could not help but notice your pain at using autotools. I have used
them for a number of other projects in the past and once set up they are
great but I agree they are a major pain when you have to reconfigure the
project a lot...

In any event, I am sure this is not an option but a make system I use
that is super-easy to learn and works pretty well on a variety of
platforms is CMake. I will not belabor the point but here is all it
takes to make a sample project on Linux, windows and mac with a shared
library and an executable to call/test it:
cmake_minimum_required(VERSION 2.6)
PROJECT(dvdhash)
ADD_DEFINITIONS( -Wall -ggdb)
ADD_LIBRARY( dvdhash SHARED dvdhash.cpp )
ADD_EXECUTABLE(dvdhash_test dvdhash_main.cpp)
TARGET_LINK_LIBRARIES(dvdhash_test dvdhash dvdread)

On Linux it makes dvdhash_test (executable) and libdvdhash.so. On
Windows (from the same source) it makes dvdhash.exe and dvdhash.dll. On
Mac it makes a dynlib (whatever; I don't do Mac so much anymore) and
dvdhash as an executable. I wrote a tiny python script to jumptstart
projects so if I want to test something out quickly, I can create a
directory, cd into it, call my script, answer a few questions and in
seconds have a complete project as outlined above (shared library on
Linux along with a test-harness), skeletal C++ code and the whole smash
is built and executable in like 15 seconds. The point is I can go from
nothing to running code that I can start hanging my test code off of in
no time. 

Anyhow if it helps someone cool, check out www.cmake.org. This is about
the most painless make system I have seen...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.