Page 1 of 1

CodeLite CMake not finding build files

Posted: Thu Nov 18, 2021 4:43 am
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.


Re: CodeLite CMake not finding build files

Posted: Thu Nov 18, 2021 3:11 pm
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


Re: CodeLite CMake not finding build files

Posted: Thu Nov 18, 2021 5:10 pm
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.


Re: CodeLite CMake not finding build files

Posted: Thu Nov 18, 2021 5:38 pm
by DavidGH

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


Re: CodeLite CMake not finding build files

Posted: Fri Nov 19, 2021 8:24 pm
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.


Re: CodeLite CMake not finding build files

Posted: Sat Nov 20, 2021 12:41 am
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: