What about using cmake for project control?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

What about using cmake for project control?

Postby jiandingzhe » Sat Jul 09, 2011 11:36 am

Currently, the source code in SVN has separate build controllers for MSVC, make for 32 bit linux, make for 64 bit linux, and mac.

So, why not using cmake as build controller generator? It has many advantages:
- It can generate makefiles, MSVC projects, Codeblock projects, Eclipse projects, and many...
- It can configure the project in a tidy manner. For example, one can trigger an option to configure whether it builds a single-float or double-float version :) (OGRE and Bullets has this).
- It is widely used by many people, like Ogre, OSG, Bullets, KDE. Thus it's robust and well-supported.

I'm using cmake for my C/C++ programs, and I felt it pretty good.
User avatar
jiandingzhe
 
Posts: 48
Joined: Fri Jul 08, 2011 11:21 am
Location: Beijing

Re: What about using cmake for project control?

Postby Julio Jerez » Sun Jul 10, 2011 2:05 pm

I never used cmake, but if you wan to donate a project I put it in SVN.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: What about using cmake for project control?

Postby jiandingzhe » Sun Jul 10, 2011 11:28 pm

Julio Jerez wrote:I never used cmake, but if you wan to donate a project I put it in SVN.

I'm going to write a cmake project file.
By the way, what kind of project do you use?
User avatar
jiandingzhe
 
Posts: 48
Joined: Fri Jul 08, 2011 11:21 am
Location: Beijing

Re: What about using cmake for project control?

Postby Julio Jerez » Mon Jul 11, 2011 6:04 pm

what do you mean what kind of project?
there is a visual studio, and a xcode, and a make file.

was cMake a wirite one make file once and then generate project for any system?
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: What about using cmake for project control?

Postby jiandingzhe » Mon Jul 11, 2011 9:55 pm

Julio Jerez wrote:what do you mean what kind of project?
there is a visual studio, and a xcode, and a make file.

was cMake a wirite one make file once and then generate project for any system?

I mean build system.
Do you manually maintain the MSVC file, the xcode file, and the makefile?
CMake is that you write one CMakeLists.txt (or one for each directory), and it generate project for any system.
User avatar
jiandingzhe
 
Posts: 48
Joined: Fri Jul 08, 2011 11:21 am
Location: Beijing

Re: What about using cmake for project control?

Postby Julio Jerez » Mon Jul 18, 2011 9:01 am

I manipulate the manually yes. In Mac I use xcode, and in window visual studio, a make in linux.

the is the problem I have with the automatic tools, the take away all of the simplicity of working with and IDE
However that should no be a big problem, because the project doe no change much.
so I can see me using Visual studio and editing the cMake file each time I make a change for the other platform.

I make come very useful specially when moving from one version of visual studio to the next,
for example Visual studio 2010 has so many changes that is in no backward compatible with VS2009
plus there are many Bug in the VS2010 IDE.

CMake will create the projects rather that convert them.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: What about using cmake for project control?

Postby thedmd » Fri Aug 26, 2011 5:17 pm

CMake solve problem of multiple places where source code files are listed. As a bonus you will get vague MSVC and Xcode projects. For example you will not be able to decide where to put intermediate files.

CMake is PITA in our engine. So I cannot recommend you this software.
thedmd
 

Re: What about using cmake for project control?

Postby Firefly » Thu Sep 01, 2011 1:42 am

I'd actually recommend Premake. It's so much nicer and easier to create a build script with and it supports a lot of platforms. It's based on LUA so you can create pretty advanced scripts if you need to.

http://industriousone.com/premake
Firefly
 
Posts: 32
Joined: Wed Jan 17, 2007 4:58 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 405 guests

cron