Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: CMake feedback  (Read 2392 times)

0 Members and 1 Guest are viewing this topic.

Klaim

  • Full Member
  • ***
  • Posts: 137
    • View Profile
CMake feedback
« on: April 20, 2011, 11:26:20 am »
Hi,

I'd like to have some feedback about the use of CMake so far for your team.
I'm trying to use it for an open source project but I'm having a hard time and I'm starting to think that some alternatives might be better (like PreMake) but less complete for the moment.

Any feedback, positive, negative, things to know or to understand before getting fluent in CMake, would be useful to me.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
CMake feedback
« Reply #1 on: April 20, 2011, 12:08:53 pm »
I have no experience with other meta-build systems, except QMake. So I can't really compare.

In my opinion, what makes CMake a good choice is its power and flexibility. It's very complete, yet it allows you to tweak almost everything -- and the bigger your project is, the more you need to customize the build process.

The downside is indeed the complexity of learning it. If you look at SFML's CMake files, you'll find many tricks and commands that required a few hours of searching in the doc and testing.

The support for various OSes / compilers / build systems is very good, except for Mac OS X frameworks apparently.
CTest (unit tests) and CPack (packaging) are also very convenient if you need these features, they integrate very well to the CMake files.

So my conclusion is: if you're motivated enough to learn it, it's worth the effort.

If you have more specific question, just ask ;)
Laurent Gomila - SFML developer

Klaim

  • Full Member
  • ***
  • Posts: 137
    • View Profile
CMake feedback
« Reply #2 on: April 20, 2011, 01:21:47 pm »
Well I've spent a lot of time trying to learn it but still have things that seems obscure to me (even if I asked on the mailing list).

But I guess I didn't practice enough yet to even have specific questions.
I'll continue with it for a time. I'll certainly try PreMake one a toy project too, see the differences.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
CMake feedback
« Reply #3 on: April 20, 2011, 05:26:23 pm »
Recently, I have opened a similar thread. Basically, my problem was the complexity of CMake in the beginning, too. I haven't come across any good tutorials (the official one shows too much at once, in my opinion). But I have taken a look at a . Probably the greatest part of the things I have learned up to now results from looking at SFML CMake files. But sometimes, they are still obscure to me ;)

I am now using CMake in my Thor library, the code is not too complex yet. Maybe you could also have a look at it (although I'm not very experienced and probably not the best role model) :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Klaim

  • Full Member
  • ***
  • Posts: 137
    • View Profile
CMake feedback
« Reply #4 on: April 26, 2011, 02:42:25 pm »
I'm also looking at the Ogre library CMake files but just by reading you know that the guy who proposed the switch to CMake was already fully mastering CMake --> too complex to fully understand.

I think I didn't dive enough into it anyway, I'll continue with it for some projects, see where I get.

Thanks for pointing the video tutorials, I'll check those, even if I don't like videos as tutorial as they force you to lose fixed time to get informations.