2

I've been fooling around with OpenCV and want to continue working with it, but I'm no longer able to live with cmake. Is anyone aware of a tool that will translate cmake build descriptions into autotools?

EDIT: I was hoping not to turn this into another flame war, but I guess that's inevitable, so I will just say that I have considerably more experience with autotools and no desire to learn cmake (or scons or imake or ant, although I seem pretty much stuck with the latter when working with Java these days, or whatever new tool is invented next year or the year after). I could fire off the usual rant about learning how and why the current tools work before inventing a new one, but I'd rather make a plea for peaceful coexistence: can't autotools and cmake just get along in the same project? That way I can do things in way that makes sense to me and others can do so as well. A way to translate automatically between the two would make life much easier for users and maintainers.

BD at Rivenhill
  • 12,395
  • 10
  • 46
  • 49
  • 3
    What exactly is it that you believe autotools will do better than cmake? – pdusen Feb 26 '12 at 08:47
  • 1
    I would not recommend autotools. It's un-maintainable, the syntax is hard to understand and it's notoriously not user-friendly if you're not a Unix geek. Maybe you would like to try Scons or something similar (http://www.scons.org/) – Laurent Grégoire Feb 26 '12 at 09:15
  • Everytime I have to look at a scons file, I find that unmaintainable too...
    The learning curve is about the same for all three, and arguably, autotools projects are the easiest to compile for Linux distributions.
    – jørgensen Feb 26 '12 at 10:03
  • There Autotools -> CMake translation guides, but i really doubt that automatic tool for CMake -> Autotools translation exists. I double @pdusen comment, what you don't like in CMake? – arrowd Feb 26 '12 at 11:58
  • 2
    The autotools are extremely user friendly. They are notoriously non-developer friendly, however. That is by design. Developing software is challenging, and although one of the primary goals of software development is to make things simple, tools which do so at the expense of functionality are far less developer-friendly. – William Pursell Feb 26 '12 at 13:15

1 Answers1

5

There appear to be no CMake ==> Autotools automated systems, or, to the best of my knowledge (or my Google searches), any step-by-step methods to do this. It seems developers, on the whole, prefer CMake to Autotools.

However, it should be noted that there are no fully automated tools to convert from Autotools to CMake anyway - there are scripts, such as the one written for the conversion of KDE to CMake, but these are quite project-specific and will require a fair bit of wrangling to match an individual projects needs.

There are step-by-steps, such as the StackOverflow question here, which might be of use in understanding some of the conversion processes, but they almost certainly won't be much help.

Unfortunately, your best bet is to try the conversion yourself. This, however, will require you to do some learning, at the very least to understand CMake in order to reproduce it in Autotools. In addition, unless you produce a tool to perform the conversion automatically for you, specific to the OpenCV project, you'll have to redo the conversion for each new OpenCV release.

Realistically, then, the amount of learning required to mess with the OpenCV source is far less than the amount of learning you would have to undergo to do the project specific conversion of OpenCV to Autotools yourself. There might be somebody else, perhaps on the OpenCV mailing list, who has a similar desire to avoid learning the small amount of cmake needed to play with OpenCV, and has converted to an older build system, although that might be grasping at straws.

Community
  • 1
  • 1
simont
  • 68,704
  • 18
  • 117
  • 136