Jump to content
  • Advertisement
Sign in to follow this  
NickCullen

CMake Made East

This topic is 1086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey Guys!

Whilst helping my friend learn C++ I wanted an easier way for him to manage libraries and set up projects. This lead me to start development on a python script which provides a layer of abstraction to the CMakeLists.txt file.

I've only recently started development on it but I am excited at its potential. To see what I mean, take a look at my blog post:

http://blog.nickcullen.net/2015/11/cmake-made-easy-first-look.html

 

I intend to port over my CMake scripts for my game engine to these once development is complete. I'm trying to complete one project a month, so hopefully it won't be too long!

 

If you want to follow along (or maybe even contribute) you can find the repo on Github:

https://github.com/NickCullen/cmakeconf

 

Also... This is my first post - Hello! smile.png

 

EDIT:: Oh man... first post and I put a typo in the title!! It was meant to say "CMake made easy" (facepalm) 

 

Cheers,

Nick

Edited by NickCullen

Share this post


Link to post
Share on other sites
Advertisement
And this is why everyone should just say No to CMake. tongue.png

When you need a generator for you build system generator, the latter has utterly failed at its one job.

Your work is good, I'm not disparaging that! Just the over-hyped pile of garbage that is CMake. smile.png

Share this post


Link to post
Share on other sites

And this is why everyone should just say No to CMake. tongue.png

When you need a generator for you build system generator, the latter has utterly failed at its one job.

Your work is good, I'm not disparaging that! Just the over-hyped pile of garbage that is CMake. smile.png

Haha yes describing this concept to a friend as a "generator for a generator" was quite amusing! But I do believe it abstracts it well enough to simplify the experience of using CMake!

Someone has just pointed out biicode to me, a C/C++ dependancy manager which sounds very interesting (coincidently is also a generator for CMake) which I shall be taking a look at over the next few days. It uses the same sort of config file syntax but with a package manager built onto it :)

 

Cheers,
Nick

Share this post


Link to post
Share on other sites
Did you consider extending cmake itself, as in, submitting patches to the project?
No idea about feasibility though.

@SeanMiddleditch
I fully agree, Cmake is however the least worse solution to multi-platform build stuff afaik, unless I am missing something?

Share this post


Link to post
Share on other sites


I fully agree, Cmake is however the least worse solution to multi-platform build stuff afaik, unless I am missing something?

Eh. I still use CMake for a couple of projects, but it's not anywhere close to ideal. What it does do is let me very quickly have Windows/Linux/Mac builds up and running, but in the end, it doesn't integrate perfectly with the tools on *any* of the platforms, which means I'm spending a bunch of time tweaking CMake instead of making one-line IDE fixes.

 

I've also gone down the route of maintaining 3 full build systems (Visual Studio for Windows, XCode for Mac, Makefiles for Linux), and while it's a little more effort to keep synchronized, I think it's actually a more sane direction for a single-developer project.

 

That or just work in something like Unity, that has all the cross-platform toolchain stuff out of the box...

Share this post


Link to post
Share on other sites

And this is why everyone should just say No to CMake. tongue.png

When you need a generator for you build system generator, the latter has utterly failed at its one job.

Your work is good, I'm not disparaging that! Just the over-hyped pile of garbage that is CMake. smile.png

What would you recommend for this then?

Share this post


Link to post
Share on other sites


Did you consider extending cmake itself, as in, submitting patches to the project?
No idea about feasibility though.

 

I've not looked at the source code as of yet... but maybe once I get the proof of concept working as a python tool I may take a look at including it into CMake.

Share this post


Link to post
Share on other sites

What would you recommend for this then?


I've been dinkering around with premake and find it far more tolerable, but haven't used it on any project of significant scale, so there's probably some fatal flaw in there I haven't encountered yet. One upshot though is that patching premake locally is far easier than patching CMake; I tried fixing a few small bugs in CMake that are huge problems for us at work and ended up giving up, which for me is saying something.

Most truly large projects I know end up having to just roll their own build system anyway, though. Even folks using CMake are essentially already doing that, as this thread indicates, and we've done as well (we have a particular need on our project for a feature that we had to roll ourselves, which we did in CMake's language; screw that noise, it was and still is a complete and absolute nightmare straight out of hell's rectum).

Generators like SCons or premake or so on, on account of using a real programming language instead of CMake's terrible home-grown mess, make it easier to just use the low-level generators as libraries while developing your own high-level front-end that meets your needs.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!