CodeLite CMake not finding build files

General questions regarding the usage of CodeLite
seasoned_geek
CodeLite Curious
Posts: 4
Joined: Thu Mar 12, 2020 9:40 pm
Genuine User: Yes
IDE Question: c++
Contact:

CodeLite CMake not finding build files

Post by seasoned_geek »

Codelite 13.0.0 from Ubuntu 20.04 LTS repos.

I searched this forum and didn't find any mention of this so asking question.

Simple little CMake based project to bring up three nearly empty windows written in NanoGUI.

Tried to follow this official guide: https://docs.codelite.org/plugins/cmake/.

Right clicking and choosing "Run CMake" shows this in the build window:

Code: Select all

cmake /home/developer/Projects/codelite/fullscreen-1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/developer/Projects/codelite/cmake-build-Debug/fullscreen-1
==== Done ====

directory files look okay

cmake-generation.PNG

Hitting [F7] shows the following:

Code: Select all

MESSAGE: Entering directory `/home/developer/Projects/codelite/build-debug'
/bin/sh -c 'make -j4'
----------Building project:[ fullscreen-1 - Debug_Linux ]----------
make: *** No targets specified and no makefile found.  Stop.
====0 errors, 0 warnings====

If I try the build from the right click menu I also get this:

Code: Select all

MESSAGE: Entering directory `/home/developer/Projects/codelite/build-debug'
/bin/sh -c 'make -j4'
----------Building project:[ fullscreen-1 - Debug_Linux ]----------
make: *** No targets specified and no makefile found.  Stop.
====0 errors, 0 warnings====

If I try the "cmake" option from the same right click menu this is the output

Code: Select all

MESSAGE: Entering directory `/home/developer/Projects/codelite/build-debug'
/bin/sh -c 'cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1'
----------Building project:[ fullscreen-1 - Debug_Linux ]----------
CMake Error: The source directory "/home/developer/Projects/codelite" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
====0 errors, 0 warnings====

Do I have to fill a working directory in here?

cmake-generation.PNG

There has to be something simple I'm missing.

Appreciate any help.

You do not have the required permissions to view the files attached to this post.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: CodeLite CMake not finding build files

Post by DavidGH »

Hi,

Codelite 13.0.0 from Ubuntu 20.04 LTS repos

I can't remember when cmake projects were added to CodeLite, but it was not long ago. It's possible that 13.0 was the first release that included cmake, and I'm sure there have been improvements since.

I suggest you upgrade, either to 15.0 release available here or else the latest 'weekly' build.

Regards,

David

seasoned_geek
CodeLite Curious
Posts: 4
Joined: Thu Mar 12, 2020 9:40 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: CodeLite CMake not finding build files

Post by seasoned_geek »

DavidGH wrote: Thu Nov 18, 2021 3:11 pm

Hi,

Codelite 13.0.0 from Ubuntu 20.04 LTS repos

I can't remember when cmake projects were added to CodeLite, but it was not long ago. It's possible that 13.0 was the first release that included cmake, and I'm sure there have been improvements since.

I suggest you upgrade, either to 15.0 release available here or else the latest 'weekly' build.

Thanks, I'll see if there is a PPA.

DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: CodeLite CMake not finding build files

Post by DavidGH »

The first link is not a ppa; it's a proper repository.

seasoned_geek
CodeLite Curious
Posts: 4
Joined: Thu Mar 12, 2020 9:40 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: CodeLite CMake not finding build files

Post by seasoned_geek »

Still no joy in Mudville.

Really wish they would let you attach PDF here.

https://www.logikalsolutions.com/wordpr ... report.pdf

That's a cut of the documentation I was working on for the junior developers. We were going to use CodeLite as the standard IDE for the project because it advertised CMake support.

Yes, the code in there doesn't work/compile. The point of the exercise was to make something compile via CMake.

The pictures show every step that I did and the words explain stuff. There is either something missing from the official instructions page or CMake only works if you choose one of the pkgConfig type project paths.

Oh, just to complete the report, NanoGUI can be found here.

https://github.com/mitsuba-renderer/nanogui

There is more that isn't in that document, where I went back and filled more information in the dialogs like target name, etc. Nothing made a difference.

At least with 13.0.0 I could edit my own CMakeLists.txt and build in a terminal window. Can't really do that with 15 and it certainly doesn't like something I'm doing.

DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: CodeLite CMake not finding build files

Post by DavidGH »

Really wish they would let you attach PDF here.

I'm not sure why it isn't allowed, but compressing it to pdf.gz did work.

I'm afraid my experience with CodeLite cmake projects is minimal: I did once manage to get one of the official cmake samples to build, but only after considerable hacking. Trying again today was a miserable failure.

Presumably it is possible. Perhaps someone else with more cmake knowledge could help...

Otherwise the only way I know to use cmake in CodeLite successfully is with a Custom Build: Project Settings > Customise. You then can set your choice of compiler/linker commands etc:

You do not have the required permissions to view the files attached to this post.
Post Reply