On Sun, 11 Nov 2012 09:39:26 +0800
JonY <[email protected]> wrote:

> On 11/11/2012 02:22, Jon wrote:
> > 
> > It's unfortunate you both had bad experiences with cmake. Cmake really is 
> > quite powerful, and recent syntax mods make it friendlier to use.
> > 
> > For example, I contributed the following cmake build scripts to the mruby 
> > project
> > 
> >   https://github.com/mruby/mruby/blob/master/CMakeLists.txt
> >   https://github.com/mruby/mruby/blob/master/tools/CMakeLists.txt
> >   https://github.com/mruby/mruby/blob/master/tools/mruby/CMakeLists.txt
> >   
> > https://github.com/mruby/mruby/blob/master/cmake/modules/IntrospectSystem.cmake
> > 
> > which are fairly modular and maintainable.
> > 
> 
> They look clean, but mods? cmake has mods? These has to be installed by
> the end user too?

I meant cmake made syntax modifications (mods) so their DSL wasn't so ugly and 
hard on the eyes and fingers.

Cmake enables you the committer to provide custom helper modules to make your 
build easier to use and maintain. You put these helper modules wherever you 
want in your source repo and put them on cmake's module path like:

  https://github.com/mruby/mruby/blob/master/CMakeLists.txt#L69
  
I'm allergic to autotools but this appears similar to distribution/usage of 
custom m4 macros. Users don't have to install your custom helpers.


> > Another nice thing about cmake is it's concept of "toolchain files" that 
> > allow you to easily modularize cross-compiling build recipes. For example, 
> > with the same basic structure as above, one creates toolchain "libraries" 
> > to support different platforms:
> > 
> 
> "Toolchain files" for every system and triplet combination that you MAY
> want to support? This is one of the parts that I do not understand about
> cmake, why does it have to make cross-compile difficult?
> 
> That is kind of backwards when autotools make it so simple to support
> cross compiles.

I think of toolchain files as just one way to help make cross-compiles easier. 
As these are just cmake variables

  
https://github.com/mruby/mruby/blob/master/cmake/Toolchain-Arch-mingw32.cmake.sample#L12-30

I could envision one could wrap them in a main CMakeLists.txt file and drive 
them from the cmd line similar to our beloved configure's --host, --target, and 
--build. I think you can slice-n-dice it to best match how you want users to 
experience your build process.


> > And one more thing, cmake generates ninja build files (yes, the ninja 
> > single-file-exe runs on Windows and is easily built on Windows using mingw) 
> > in addition to the plethora of other build files it supports. I use it to 
> > build on Windows, Arch, Ubuntu and my quaint little Snow Leopard VB VM.
> > 
> > If you looked at cmake awhile ago and hated it's odd syntax, things have 
> > gotten better. You really should look at it again starting with the 2.8 
> > series. Oh look, 2.8.10.1 just came out with binary downloads for your 
> > favorite system.
> > 
> 
> Maybe, but I am still not keen on dealing with it in the future,
> especially in the mingw-w64 repository.

Obviously, you guys have to use what works for you. I simply wanted to provide 
a perspective from a person who had used cmake years ago, hated it for so long 
I reverted back to a cmake noob, but tried it again using cmake 2.8 and 
powerfully naive noob eyes. I was pleased, but did have to invest some time.

And looking over the cmake stuff from the LLVM folks was a decent jumpstart

  http://llvm.org/svn/llvm-project/llvm/trunk/

But, I'm also a long time autotools hater (impl not concepts) so build tools 
like cmake, waf, and custom written configure.{py,rb} + ninja appeal to me. 
Hey, where's the `go get github.com/mingw-w64/ironcrate` recipe? ;)

Jon

---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to