Getting started with WorkingWithCMake

General questions regarding the usage of CodeLite
arnon
CodeLite Curious
Posts: 1
Joined: Wed Mar 21, 2018 12:33 pm
Genuine User: Yes
IDE Question: c++
Contact:

Getting started with WorkingWithCMake

Post by arnon »

Hi there,

I am a newbie to CodeLite also to CMake. (So be patient with me :)
I trying to setup a basic project following
http://codelite.org/LiteEditor/WorkingWithCMake
with very little success.

1. Is there a better step-by-step tutorial for creating a new project using CMake?
2. I run the CMake on my new project (after importing file from a directory) and the CMakeLists.txt seems rather empty and maybe not build correctly/entirely. Also I don't see a makefile created in my cpp folder.
3. Also reading (and following) here:
http://codelite.org/LiteEditor/TheCMakePlugin
and the line
"Generates CMakeLists.txt files for the selected project and all its dependencies (as dictated in the project's Build Order)"
yet checking my project's Build Order and it's empty :cry:
4. Checking the source code itself I have a
std::cout which is colored red. right clicking the code suggests me to import iostream yet the std::cout color stays red - is that an error? was the iostream imported?
5. When I run (from my new project menu) Custom Targets -> cmake-debug I get an error for a missing CMakeLists.txt file in a build-debug sub-directory which was created as instructed in http://codelite.org/LiteEditor/WorkingWithCMake I Don't understand this. I do have a sub-directory named cmake-build-Debug created by Run CMake earlier.
6. Lastly, should I use a previous version of CodeLite?

Using version 12.0.0
Using CMake 3.10.3
On Ubuntu 16.04 LTS

Thanks for the help.
Arnon.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Getting started with WorkingWithCMake

Post by eranif »

The link: http://codelite.org/LiteEditor/WorkingWithCMake is the OLD way of working with CMake
The latter is the preferred way
Make sure you have read the HOW TO POST thread
Post Reply