News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

How do you setup CB to use CMake?

Started by Napoleon, April 22, 2014, 03:19:00 PM

Previous topic - Next topic

Napoleon

[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

stahta01

#1
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

dmoore

Quote from: 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


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.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]