Sourceview shows only flat hierarchy

General questions regarding the usage of CodeLite
sparhawk
CodeLite Curious
Posts: 3
Joined: Wed Sep 16, 2015 10:43 am
Genuine User: Yes
IDE Question: C++
Contact:

Sourceview shows only flat hierarchy

Post by sparhawk »

I'm new to Codelite and I was wondering if it is possible to have the sources viewd in a hierarchical view. I know that I can create virtual folders, but my project is created with CMake and creating those is not really helpfull.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Sourceview shows only flat hierarchy

Post by eranif »

If you are using CMake with version 3.0.X and later, you can generate CodeLite workspace using CMake which will fit your CMakeLists.txt file(s):

Code: Select all

Generators

The following generators are available on this platform:
  Unix Makefiles              = Generates standard UNIX makefiles.
  Ninja                       = Generates build.ninja files (experimental).
  CodeBlocks - Ninja          = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
  CodeLite - Ninja            = Generates CodeLite project files.
  CodeLite - Unix Makefiles   = Generates CodeLite project files.
  Eclipse CDT4 - Ninja        = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles
                              = Generates Eclipse CDT 4.0 project files.
  KDevelop3                   = Generates KDevelop 3 project files.
  KDevelop3 - Unix Makefiles  = Generates KDevelop 3 project files.
  Kate - Ninja                = Generates Kate project files.
  Kate - Unix Makefiles       = Generates Kate project files.
  Sublime Text 2 - Ninja      = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                              = Generates Sublime Text 2 project files.
OR you can always create a single empty project and then using the context menu:
"Import files from directory" - and CodeLite will import all your source files while keeping the directory structure you have on the file system

Eran
Make sure you have read the HOW TO POST thread
sparhawk
CodeLite Curious
Posts: 3
Joined: Wed Sep 16, 2015 10:43 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Sourceview shows only flat hierarchy

Post by sparhawk »

eranif wrote:If you are using CMake with version 3.0.X and later, you can generate CodeLite workspace using CMake which will fit your CMakeLists.txt file(s)OR you can always
The workspace was created by CMake, as I use 3.8 and I noticed that CodeLite is supported. B ut the view is still not hierarchical, so maybe I do something wrong? Do I have to give some additional options?
create a single empty project and then using the context menu:
"Import files from directory" - and CodeLite will import all your source files while keeping the directory structure you have on the file system
Thanks. In this case this is not an option though, because I would loose all the settings applied by CMake. :)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Sourceview shows only flat hierarchy

Post by eranif »

sparhawk wrote:In this case this is not an option though, because I would loose all the settings applied by CMake.
Not really... this is where custom makefile project are very handy:

http://codelite.org/LiteEditor/CustomMakefiles#toc3

In fact, this is how I develop CodeLite on Linux and OSX
Eran
Make sure you have read the HOW TO POST thread
sparhawk
CodeLite Curious
Posts: 3
Joined: Wed Sep 16, 2015 10:43 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Sourceview shows only flat hierarchy

Post by sparhawk »

Thanks, it works now. :) Now I only have to find out how to specify the executable for debugging. :)

Edit: Debugging now also works. Nice. :)
Post Reply