Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

CMake and Code::Blocks

(1/2) > >>

Sonic McTails:
I'm working on a project that uses CMake as a build system, which generates Makefiles, or IDE files depending on the platform, and I'm curious if any work to give Code::Blocks the ability to import CMake's build files (they are text, so it shouldn't be that complex), or allow CMake to create Code::Block project files (which might be preferable, since CMake intergrates a LOT of other IDEs, (it buidls MSVC++, Borcomd, KDevelop, etc). Since I think adding Code::Blocks support is going be the better way to go since other developers might be using other IDEs, I want to ask a few questions:

1. What is the cdp file format? Is there somewhere were it's detailed, or am I going to have to read the source code to make any sense out of it?

2. Code::Blocks doesn't seem to support building out of source directly (IE, you have your source in PROJECT_ROOT/src and the .o files and binaries goes into PROJECT_ROOT/build). I couldn't get Code::Blocks to work with the Makefile generated by CMake since I couldn't specify the directory CMake should work out of.

3. Is the CDP project file same between all platforms, or is it endian specific?

Michael:
Hello,

May be you can get some hints here:

http://forums.codeblocks.org/index.php?topic=2784.0

Best wishes,
Michael

Sonic McTails:

--- Quote from: Michael on May 04, 2006, 08:09:02 pm ---Hello,

May be you can get some hints here:

http://forums.codeblocks.org/index.php?topic=2784.0

Best wishes,
Michael


--- End quote ---

CMake is a little different, it doesn't actually do the build - it generates a build environment for your platform. IE, to compile on Linux, you do cmake .; then run make, but on Windows, you type cmake ., and then open the Visual Studio project it creates, etc.

Michael:

--- Quote from: Sonic McTails on May 04, 2006, 08:25:07 pm ---
--- Quote from: Michael on May 04, 2006, 08:09:02 pm ---Hello,

May be you can get some hints here:

http://forums.codeblocks.org/index.php?topic=2784.0

Best wishes,
Michael


--- End quote ---

CMake is a little different, it doesn't actually do the build - it generates a build environment for your platform. IE, to compile on Linux, you do cmake .; then run make, but on Windows, you type cmake ., and then open the Visual Studio project it creates, etc.

--- End quote ---

Ok, I see. It was just a suggestion. In Linux it acts like a configure? May be you can run cmake as a pre-build step.

Best wishes,
Michael

TDragon:
I would speculate that you will learn the most the fastest by directly studying the .cbp project file (note .cbp, not .cdp). It's a well-formed XML document, readable by the TinyXML library, which also answers your question of platform-specificity -- it'll be the same across all platforms.

So you'll be able to learn most of what there is to know about the project format just by making a project or two and adding/removing options, then looking at the resulting .cbp in Notepad/Wordpad. Anything that's not immediately obvious you'd have to go to the source for, but I doubt a generator like CMake would need anything especially complex anyway.

Navigation

[0] Message Index

[#] Next page

Go to full version