Page 1 of 1

Can not compile cmake project

Posted: Tue Nov 13, 2018 10:25 am
by marlac
I use CodeLite 12.0. Created executable cmake project "Hello World" . In settings I changed output file and makefile generated arguments only, the rest remained default. I'm able to generate cmake but not able to build. I received information :
make: *** No target specified and no makefile found. Stop ****
However I can see Makefile in directory . How to make everything compilable ?

Re: Can not compile cmake project

Posted: Tue Nov 13, 2018 11:50 am
by eranif
Where is the build output?
also, where is the cmake output?
Please read the "HOW TO POST" thread (see my signature)

Re: Can not compile cmake project

Posted: Tue Nov 13, 2018 3:12 pm
by pztrn
I'm experiencing same. The only OP forgot to mention that CodeLite isn't creating build directory defined in project settings and therefore isn't launching cmake. After manually creating build directory everything works.

I'm on CodeLite 12.0.9 and macOS Mojave 10.14.1.

Re: Can not compile cmake project

Posted: Wed Nov 14, 2018 1:22 am
by marlac
OS: Linux Mint 18.3 Cinamon 64bit ver. 3.6.7
CodeLite ver 12.0.0 - It is NOT self compiled version
--versiongcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609

Code: Select all

MESSAGE: Entering directory `/home/marek/Dokumenty/test2'
/bin/sh -c 'make'
----------Building project:[ test2 - Debug ]----------
make: *** No targets specified and no makefile found.  Stop.
====0 errors, 0 warnings====
I have following settings
Project type: Executable
Makefile Generator: Cmake
Arguments [empty]
Compiler: Cross GCC(x86_64-linux-gnu)
Intermediate folder :./Debug
Output File:test2
Pause when execution ends : CHECKED
This program is a GUI application: NOT CHECKED
Executable to Run/Debug :$(WorkspacePath)/cmake-build-$(WorkspaceConfiguration)/output/$(ProjectName)
Working directory: $(IntermediateDirectory)
Program arguments: [empty]
Debugger: GNU dbg debuger

Re: Can not compile cmake project

Posted: Wed Nov 14, 2018 11:17 am
by marlac
also, where is the cmake output?
Where can I check it ?

Re: Can not compile cmake project

Posted: Wed Nov 14, 2018 8:13 pm
by marlac
pztrn wrote:I'm experiencing same. The only OP forgot to mention that CodeLite isn't creating build directory defined in project settings and therefore isn't launching cmake. After manually creating build directory everything works.

I'm on CodeLite 12.0.9 and macOS Mojave 10.14.1.
I created a directory
So I fave a following setting :
Executable to Run/Debug :$(WorkspacePath)/cmake-build-$(WorkspaceConfiguration)/output/$(ProjectName)

where

WorkspacePath = /home/marek/Dokumenty/test2
WorkspaceConfiguration = Debug
ProjectName - test2

I created /home/marek/Dokumenty/test2/cmake-build-Debug/output/test2 and still nothing.
CMakeLists.txt has been generated into /home/marek/Dokumenty/test2/test2

What should I change in settings and where in Codelite they are to make it compilable ?

Re: Can not compile cmake project

Posted: Wed Nov 14, 2018 10:51 pm
by neildarlow
I have created a simple console application and all changes were done in the project creation dialogs i.e.

Code: Select all

Build system: CMake
Compiler: GCC
I did not specify the output file i.e. leave it blank.

Right-click the project entry in the Workspace tab and select Export CMakeLists.txt
Right-click the project entry in the Workspace tab and select Run CMake

The cmake-build-Debug directory and project_name and output sub-directories are created.
A build and execute perform correctly.

I have seen the error the OP experienced under very specific conditions i.e. I created a project with Default build system and then modified the project options to CMake build system. Starting afresh with a regenerated Workspace and project with the CMake build system fixed it for me.

These experiments were performed on Linux Mint 19 using the codelite-12.0-1unofficial .deb from David's repository.

Regards,
Neil