Author Topic: CMake and Code::Blocks  (Read 32459 times)

Offline Sonic McTails

  • Multiple posting newcomer
  • *
  • Posts: 12
CMake and Code::Blocks
« on: May 04, 2006, 07:54:21 pm »
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?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: CMake and Code::Blocks
« Reply #1 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

Offline Sonic McTails

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: CMake and Code::Blocks
« Reply #2 on: May 04, 2006, 08:25:07 pm »
Hello,

May be you can get some hints here:

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

Best wishes,
Michael


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.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: CMake and Code::Blocks
« Reply #3 on: May 04, 2006, 09:06:23 pm »
Hello,

May be you can get some hints here:

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

Best wishes,
Michael


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.

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

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: CMake and Code::Blocks
« Reply #4 on: May 04, 2006, 09:08:42 pm »
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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CMake and Code::Blocks
« Reply #5 on: May 04, 2006, 09:45:30 pm »
I was contacted around the end of last year by a CMake developer (Bill) and he expressed interest to add C::B project generation in CMake.
I helped him as much as I could, I answered any questions he had. This took around 3 weeks. I haven't heard from him since.

So, you might want to check/ask in the CMake community. Maybe there 's work already been done regarding C::B support in CMake...
Be patient!
This bug will be fixed soon...

Offline Sonic McTails

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: CMake and Code::Blocks
« Reply #6 on: May 04, 2006, 10:08:13 pm »
I was contacted around the end of last year by a CMake developer (Bill) and he expressed interest to add C::B project generation in CMake.
I helped him as much as I could, I answered any questions he had. This took around 3 weeks. I haven't heard from him since.

So, you might want to check/ask in the CMake community. Maybe there 's work already been done regarding C::B support in CMake...

I intend to do so, but I wanted to get some idea what I was getting into ;-). Anyway, is there some way to get Code::Blocks to reread it's project file after its been loaded. Part of CMake's design is that it regenerates the project files if the CMakeLists are changed. I know when usign the XCode generator, you have to close and reopen it, but does Code::Blocks detect when its project file has changed?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: CMake and Code::Blocks
« Reply #7 on: May 04, 2006, 10:18:11 pm »
I was contacted around the end of last year by a CMake developer (Bill) and he expressed interest to add C::B project generation in CMake.
I helped him as much as I could, I answered any questions he had. This took around 3 weeks. I haven't heard from him since.

So, you might want to check/ask in the CMake community. Maybe there 's work already been done regarding C::B support in CMake...

I have googled for a bit and have found just this email (no other info in the CMake website):

http://public.kitware.com/pipermail/cmake/2006-January/007913.html

It seems that Bill has found no time and no volunteers for writing a generator in c++ for the codeblocks IDE :(.

I will contact the CMake community and ask them if something is or will be done.

Best wishes,
Michael

Offline Sonic McTails

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: CMake and Code::Blocks
« Reply #8 on: May 04, 2006, 10:55:07 pm »
I was contacted around the end of last year by a CMake developer (Bill) and he expressed interest to add C::B project generation in CMake.
I helped him as much as I could, I answered any questions he had. This took around 3 weeks. I haven't heard from him since.

So, you might want to check/ask in the CMake community. Maybe there 's work already been done regarding C::B support in CMake...

I have googled for a bit and have found just this email (no other info in the CMake website):

http://public.kitware.com/pipermail/cmake/2006-January/007913.html

It seems that Bill has found no time and no volunteers for writing a generator in c++ for the codeblocks IDE :(.

I will contact the CMake community and ask them if something is or will be done.

Best wishes,
Michael


Hit me up on AIM/ICQ/MSN and we can work this out, because I'm actually writing an email myself:

AIM: Sonic McTails
ICQ: 160566652 (got to love evil ICQ numbers ;-))
MSN: sonicmctails@yahoo.com

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: CMake and Code::Blocks
« Reply #9 on: May 05, 2006, 11:16:28 am »
I was contacted around the end of last year by a CMake developer (Bill) and he expressed interest to add C::B project generation in CMake.
I helped him as much as I could, I answered any questions he had. This took around 3 weeks. I haven't heard from him since.

So, you might want to check/ask in the CMake community. Maybe there 's work already been done regarding C::B support in CMake...

I have googled for a bit and have found just this email (no other info in the CMake website):

http://public.kitware.com/pipermail/cmake/2006-January/007913.html

It seems that Bill has found no time and no volunteers for writing a generator in c++ for the codeblocks IDE :(.

I will contact the CMake community and ask them if something is or will be done.

Best wishes,
Michael


Hit me up on AIM/ICQ/MSN and we can work this out, because I'm actually writing an email myself:

AIM: Sonic McTails
ICQ: 160566652 (got to love evil ICQ numbers ;-))
MSN: sonicmctails@yahoo.com

Hello,

Do you can forward the email at my address?

It would be useless if we write 2 times the same thing. My intention was to reply to the email above, hoping and answer from Bill.

Best wishes,
Michael