Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Napoleon on April 22, 2014, 03:19:00 pm

Title: How do you setup CB to use CMake?
Post by: Napoleon on April 22, 2014, 03:19:00 pm
[Ubuntu 13.10, CB 13.12 compiled]

I've been reading in another thread about how CMake supports CB.  I would like to understand how to setup CB to use CMake and existing CMakeList.txt files.  Currently I'm calling a script that runs 'catkin_make', which uses CMake.  I have cmake version 2.8.11.2.


Cheers,
Nap
Title: Re: How do you setup CB to use CMake?
Post by: stahta01 on April 22, 2014, 05:00:35 pm
This is just a guess.

Create a separate project to run CMAKE.
(I would use a CB custom makefile project)

That creates another  project (IIRC, a custom makefile project)

Then, create a workspace to hold the two projects.

Step 1, is to use CMAKE to build a CB custom makefile project; have you done that?
(Till you figure out the steps to do that it is a waste of time trying to get CB to do those steps!!)

Tim S.
Title: Re: How do you setup CB to use CMake?
Post by: dmoore on April 22, 2014, 05:33:19 pm
[Ubuntu 13.10, CB 13.12 compiled]

I've been reading in another thread about how CMake supports CB.  I would like to understand how to setup CB to use CMake and existing CMakeList.txt files.  Currently I'm calling a script that runs 'catkin_make', which uses CMake.  I have cmake version 2.8.11.2.


Cheers,
Nap

Code
cmake . -G "CodeBlocks - Unix Makefiles"

Will generate a Code::Blocks project file that you can open, build and run. I could be imagining things but it also appears to magically regenerate the make files when you pull in changes from an external source. On the other hand, I don't think it's easy to add new project files short of editing the CMakelist.txt files.