The structure of the project will be:
<project dir>
|- Debug
|- src
|- Release
Create first a new workspace and then open the Workspace Settings....
On the Code Completion tab select Enable C++14 Standard.
Create a new project inside this workspace (File -> New -> New Project) and select Others -> Custom makefile as project type. Then select a project name and the <project dir> for the project path. Select the clang compiler, LLDB Debugger and CMake in the next step and finish the project wizard.
Select Import Files From Directory to import your source files.
Open the project settings and adjust the following settings:
General:
- Intermediate Folder: $(ProjectPath)/$(ConfigurationName)
- Output File: Name of your executable
- Executable to Run / Debug: $(ProjectPath)/$(ConfigurationName)/$(OutputFile)
- Working Directory: $(ProjectPath)/$(ConfigurationName)
- CMake: mkdir -p $(ProjectPath)/$(ConfigurationName) && cd $(ProjectPath)/$(ConfigurationName) && cmake ../src -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=Debug
Then execute your custom CMake command:
and the build your project.
Now the code completion should work.
A list of variables supported by CodeLite can be found in the following source file: macrosdlg.cpp