Brandon J. Van Every | 9 Feb 07:34 2007
Picon

answers to CMake questions

Hi!  I'm a 3D AI 4X TBS acronym kind of guy who has been distracted for 
3 years by exotic programming languages and open source build systems.  
My one claim to fame is I am the CMake buildmaster of the Chicken 
Scheme-to-C compiler.  http;//www.call-with-current-continuation.org .  
I'm pursuing Chicken as an alternative to C++.  I really hate the "C++ 
and a scripting language" paradigm, I just want to use one language.  I 
think Chicken can let me do it.  But I got bogged down in build issues 
for so long, that what I actually am right now is a CMake guru.  That 
said, we're currently organizing a simple OpenGL windowing project, so 
that people like myself can more easily move on to the next stage.

Back to CMake.  I was reading the archives and noticed some damning 
comments by Ben Garney, the tech director for the Torque engine.  I hope 
to provide answers for some of these issues, and also ascertain what 
Ben's expectations and desires are.  The CMake team is the most 
responsive group of open source developers I've worked with.  That's a 
big part of why I've remained involved in the CMake community.  Also 
they are exceedingly generous about getting people up to speed with 
CMake.  The 1st cut of Chicken's build system was provided gratis by 
CMake principal Bill Hoffman.  Of course now it's 1 year later and I've 
utterly effaced it, but it was certainly the right help at the right time.

I would suggest that anyone who really wants help with CMake, to get on 
the CMake mailing list.  That is the best resource for getting up to 
speed quickly with CMake.  Nobody's hostile about RTFM and everyone's 
happy to do Q&A.  The CMake community also has some ok tutorials.  My 
own Chicken build is halfway tutorialized and provides many non-trivial 
examples.  Chicken is only 75K lines of code, so it is big enough to be 
complicated, but small enough that it isn't overwhelming.

(Continue reading)

Ben Garney | 10 Feb 01:26 2007

Re: answers to CMake questions

On 2/8/07, Brandon J. Van Every <bvanevery <at> gmail.com> wrote:


I hope you will give CMake more consideration, as "terrible" just isn't
an accurate adjective based on my experience with it.  I don't believe
all tools are all things to all people, but I hope that CMake's
community resources can help you with your problems.  The community is a
*huge* part of why CMake becomes a value add.  The dirty little secret
of open source is it's not about the software, it's about the people.


Hi Brandon,

Not sure why you cross-posted to sweng-gamedev with this; I'm more than happy to discuss it privately. :)

Basically, CMake ended up being outside too many of our design constraints. We wrote a quickie tool in PHP in about a week (unimaginatively named phpBuild) that has met our needs very well - it uses smarty templates to build the project files, reads from a config file written in PHP, and spits out what we need with minimal pain. It's also easily extensible (since it uses a full-on templating engine), so we can feel confident that generating any other text format is super easy.

We might open source it at some point, but it's not really our goal to contribute yet-another-build-file-generator to the world.

Right now it generates manifest files we use to determine what code files to ship (so we can filter out NDA stuff from our public installers), and VC2k3 and VC2k5 project files. Makefile and XCode support are also on the list, although as of yet we haven't spent enough cumulative time maintaining those by hand to really justify writing the templates.

Moving into more detail on CMake, these are the key areas that were problematic to us... (I'll mention where our in-house solution was helpful or limiting as well.)
  • CMake-centric. It assumes you'll want to make project files that reference CMake. It can be turned off, as you say, but I seem to recall that it wasn't totally clean to do so - not gonna swear to it and I'm sure it's been improved since I looked. It also likes to leave files it makes lying around. Our internal system doesn't do any of this, which suits our needs better.
  • Limited build settings. It isn't possible to set every build setting or configuration for every IDE, since CMake tries to present a "generic" build environment. So if we want to enable certain settings, have custom build rules (like for lex or yacc specifications, or assembly), it's a pain. There are some options for overriding this stuff, but since it goes with the "generic" paradigm, it also likes to bring in assumptions that don't always mesh well with how we're thinking about the project. CMake also won't generate project files that play nice with non-public stuff, like the XBox 360 build requirements. Our internal system doesn't have any build settings at all beyond the rules specifying what files to bring in - it's all powered by the template and for non-auto-generated parts of the project like zlib we just reference a hand-made project file. So our thing is much less generic, requires you to be intimately familiar with all the project file formats, but also suits our needs exactly & lets us build stuff exactly how we want it.
  • Requires a binary! Even if we wanted to ship CMake, it requires a binary for the platform it's on & some setup/config work on each system. We just ship a single .php file (if we need to ship it at all), and for convenience on win32, php.exe and a DLL it requires, along with a batch file to automatically regen things. And because CMake is a binary altering the templates (to e.g. work around limitations) is a pain.
  • Not necessarily straight-forward to configure. Because CMake tries to be a generic, all-encompassing build system, its config language & functionality get a bit byzantine. If you want to live in CMake-world this is a good and appropriate thing. We don't, and we want it to be easy to tweak things, so this was a bit of a pain.
Hopefully I didn't ramble on too long there. :)

To summarize: CMake is cool and a powerful tool but it wasn't a fit for our particular needs. We were able to write a simple, extensible tool that did only what we needed, and nothing more, in a short period of time, and used that to do what we needed. We looked at several other similar OSS tools and none of them were what we wanted either, so I don't think this choice reflects poorly on CMake. (Maybe it does on the OSS options as a whole?)

Hope this helps you guys out.

Regards,
Ben Garney
Torque Technologies Director
GarageGames.Com, Inc.
beng <at> garagegames.com
_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
Brandon J. Van Every | 10 Feb 19:26 2007
Picon

Re: answers to CMake questions

Ben Garney wrote:

Not sure why you cross-posted to sweng-gamedev with this; I'm more than happy to discuss it privately. :)

The thread was from more than 2 months ago and I don't know if you're always reading sweng-gamedev.  Also I hope my responses benefit other people as well.



Moving into more detail on CMake, these are the key areas that were problematic to us... (I'll mention where our in-house solution was helpful or limiting as well.)
  • CMake-centric. It assumes you'll want to make project files that reference CMake. It can be turned off, as you say, but I seem to recall that it wasn't totally clean to do so - not gonna swear to it and I'm sure it's been improved since I looked.

I'll relay that back to the guys.

  • It also likes to leave files it makes lying around. Our internal system doesn't do any of this, which suits our needs better.

I don't understand what you mean by this.  Perhaps I should explain "out of source" builds more clearly.  If you do a build in your source tree, it of course leaves files there.  If you do an out-of-source build, it doesn't.  People doing CMake typically do out-of-source builds and their source trees remain pristine.  If the docs aren't clear on how to do an out-of-source build, then perhaps we should improve them.


  • Limited build settings. It isn't possible to set every build setting or configuration for every IDE, since CMake tries to present a "generic" build environment. So if we want to enable certain settings,

Yeah, Brad said "we can add options," but if you've got tons you need, perhaps the turnaround time on that would be unacceptable.  CMake endeavors to be a generic, common denominator, minimize-the-hassles build environment.  It does handle lotsa picky platform-specific problems also, but it's not designed to provide precise control over everything imaginable.  In that case, I think one would have to either hack the CMake sources directly (and the KDE guys do exactly that, and it gets folded into CMake if it's generally useful), or develop everything from scratch in your language of choice (as you did with PHP).

  • have custom build rules (like for lex or yacc specifications, or assembly), it's a pain.

ADD_CUSTOM_COMMAND is the typical way of running a custom tool.  My Chicken Scheme build makes extensive use of it, i.e. there is no inherent support for Scheme in CMake.  Command argument passing got better recently, as I was having trouble with cross-platform path quoting issues.  Brad King implemented a VERBATIM option that takes exactly what you specify for your arguments and doesn't try to think for you.  So with this capability it should be easier to work with external tools.

  • There are some options for overriding this stuff, but since it goes with the "generic" paradigm, it also likes to bring in assumptions that don't always mesh well with how we're thinking about the project.

Sometimes one of the "CMake Useful Variables" will solve a problem.  But if it's in the Useful Variables, it won't be all that well documented.  We have a wiki page and currently these aren't in the shipping docs.  This is the weakest area of the CMake docs IMHO.  The mailing list generally makes up for this shortcoming.  You ask about what you need, and people tell you.

  • CMake also won't generate project files that play nice with non-public stuff, like the XBox 360 build requirements.

Is MSVC for the XBox 360 a different beast?  Are nmake and/or make not available?


  • Requires a binary! Even if we wanted to ship CMake, it requires a binary for the platform it's on & some setup/config work on each system. We just ship a single .php file (if we need to ship it at all), and for convenience on win32, php.exe and a DLL it requires, along with a batch file to automatically regen things.

But php.exe is a binary...

  • And because CMake is a binary altering the templates (to e.g. work around limitations) is a pain.

I think you're saying you already know PHP.



To summarize: CMake is cool and a powerful tool

Wow, that's up from "terrible!"  I'll tell the CMake devs, they'll be pleased.

but it wasn't a fit for our particular needs. We were able to write a simple, extensible tool that did only what we needed, and nothing more, in a short period of time, and used that to do what we needed. We looked at several other similar OSS tools and none of them were what we wanted either, so I don't think this choice reflects poorly on CMake. (Maybe it does on the OSS options as a whole?)

Not sure.  If I were to point fingers, I'd say that the huge installed base of GNU Autoconf has stunted build systems for years.  I wonder how Ant would compare, if you were developing in Java.  I have no experience with it.



Hope this helps you guys out.

Yes; some of your needs we can't address, but others we could do something about.



Thanks!
Brandon Van Every

_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
Ken K | 27 Feb 19:39 2007
Picon

C++ Callbacks...

Hi guys,
 
 
 I was wondering if anyone knew where I could find the callback.h file that this article references. I was interested in experimenting with callbacks using this setup.
 
 
thanks for any help,
 
V



It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
logout | 27 Feb 19:49 2007
Picon

Re: C++ Callbacks...

Selon Ken K <kingcnute <at> yahoo.com>:

> Hi guys,
>
>
>    I was wondering if anyone knew where I could find the callback.h file that
> this article references. I was interested in experimenting with callbacks
> using this setup.
>
>   http://www.tutok.sk/fastgl/callback.html
>
>   thanks for any help,
>
>   V
>

I know you probably did, but I say it anyway: have you tried to contact the
article author? This callback.h file is nothing standard, so it's either a
private lib or part of a third party product.

Regards,

-- Emmanuel Deloget
_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com

matthew conte | 27 Feb 19:53 2007

Re: C++ Callbacks...

	http://www.newty.de/fpt/zip/callback.zip

I'm feeling lucky,
--Matt

Ken K wrote:

> Hi guys,
>  
>  
>  I was wondering if anyone knew where I could find the callback.h file 
> that this article references. I was interested in experimenting with 
> callbacks using this setup.
>  
> http://www.tutok.sk/fastgl/callback.html
>  
> thanks for any help,
>  
> V
> 
> 
> 
> ------------------------------------------------------------------------
> It's here! Your new message!
> Get new email alerts 
> <http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/> 
> with the free Yahoo! Toolbar. < 
> http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> sweng-gamedev mailing list
> sweng-gamedev <at> lists.midnightryder.com
> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com

--

-- 
matthew conte
vvisions.com
_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com

Robert Dean | 27 Feb 20:14 2007
Picon

Re: C++ Callbacks...

Not sure this is exactly the same thing but very close to what you're looking for. http://www.codeproject.com/cpp/FastDelegate.asp
We've used this in all our current projects (5 so far) with excellent results. The author for this did a great job and you can just drop it in and it works. I've personally tested it with codewarrior and visual studio on the GBA, DS, Wii and PC and haven't had any issues.

Robert
From: sweng-gamedev-bounces <at> lists.midnightryder.com [mailto:sweng-gamedev-bounces <at> lists.midnightryder.com] On Behalf Of Ken K
Sent: Tuesday, February 27, 2007 1:39 PM
To: sweng-gamedev <at> midnightryder.com
Subject: [Sweng-gamedev] C++ Callbacks...

 

Hi guys,

 

 

 I was wondering if anyone knew where I could find the callback.h file that this article references. I was interested in experimenting with callbacks using this setup.

 

 

thanks for any help,

 

V



 

It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com

Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
Ken K | 27 Feb 20:17 2007
Picon

Re: C++ Callbacks...

Well, that does the trick. I was reading Game Programming Gems 6 where i first came across this method of callbacks. I tried to contact all three authors, and all but 1 bounced with no response from the other. Now that I understand this can be a 'roll your own' type of thing, it all makes sense. Thanks for your help guys!!
 
V

matthew conte <matt <at> vvisions.com> wrote:
http://www.newty.de/fpt/zip/callback.zip

I'm feeling lucky,
--Matt

Ken K wrote:

> Hi guys,
>
>
> I was wondering if anyone knew where I could find the callback.h file
> that this article references. I was interested in experimenting with
> callbacks using this setup.
>
> http://www.tuto k.sk/fastgl/callback.html
>
> thanks for any help,
>
> V
>
>
>
> ------------------------------------------------------------------------
> It's here! Your new message!
> Get new email alerts
>
> with the free Yahoo! Toolbar. <
> http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> sweng-gamedev mailing list
> sweng-gamedev <at> lists.midnightryder.com
> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com



--
matthew conte
vvisions.com
_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com



Never miss an email again!
Yahoo! Toolbar
alerts you the instant new Mail arrives. Check it out.
_______________________________________________
sweng-gamedev mailing list
sweng-gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com

Gmane