Recent Changes - Search:

Home Page


Main

Downloads
Windows
macOS
Linux (via apt / rpm )
Linux wxWidgets
Release Notes

Wiki
Documentation
FAQ

Build CodeLite
Linux
Windows
macOS

Devs
Debug CodeLite Linux
Building Clang
Build wxWidgets (MSW)
Coding Guidelines
Create a Plugin

ProjectSettingsSummary


How to alter the setting of a Project is described discursively in Project Settings. Here, that information is repeated more concisely, in a form easier to use as a reference.

The General Page


The general page contains various bits of information regarding which compiler to use, the debugger to be associated with the project etc.

The lower part of the page - split by the gray divider labelled 'Action' - contains settings used by CodeLite when executing the build target or when debugging the target.

FieldDescriptionCommentsMacro
Project TypeSets the output type of the project. Can be one of the following: Exe, static library or shared libraryWhen changing the type from dll/exe to static library, the link stage is skipped.None
CompilerThe compiler associated to the project. The compiler list can be modified via 'Build->Advance Settings...' menuNoneNone
DebuggerThe debugger that will be invoked when debugging the projectThe list of the debugger depends on the installed debugger extensionsNone
Output FileThe project output file nameNone$(OutputFile)
Intermediate FolderThis path is used by CodeLite to store all intermediate files (object files, dependency files etc.)None$(IntermediateDirectory) or $(OutDir)
ProgramThe command to be executed when running the program (either with or without the debugger)NoneNone
Working Foldersets the working directory for the debuggee / program to runNoneNone
Program ArgumentsProgram arguments to be passed to the executed commandNoneNone
Debug argumentsIf 'Use separate debug arguments' is checked, this field contains program arguments to be passed to the debuggee, if left unchecked the 'Program Arguments' are used by the debuggee as wellNoneNone

Table 1: General Page

The Compile Page


This page contains all the information required by CodeLite during the compile stage, such as:

  • Compiler various flags (-g, -O etc)
  • Preprocessors (-D)
  • Additional search paths for include files



FieldDescriptioncommentsMacro
Use with global settingsA three option choice box that instructs codelite how to merge between the 'Global Settings' and the settings set in this pageNoneNone
Compiler OptionsA (semi-colon separated) list of options to be passed to the compiler during compilation of every source file in the projectSince CodeLite uses a makefile based system, you can pass complex expressions like $(shell wx-config --cflags)$(CmpOptions) note that this macro also includes the value set in the $(Preprocessors) macro
Additional Search PathA list of additional paths separated by semi-colons, to be passed to the compiler for locating include filesTo include paths with space, surround them with double quotation marks$(IncludePath)
PreprocessorA list of macros separated by semi-colons, to be passed to the compilerNone$(Preprocessor)

Table 2: Compiler Page

The Linker Page


This page contains all the information required by CodeLite during the Link stage, such as:

  • Linker various flags (-OX, -fPIC etc)
  • Libraries needed for link
  • Additional search path for libraries



FieldDescriptioncommentsMacro
Use with global settingsA three option choice box that instructs codelite how to merge between the 'Global Settings' and the settings set in this pageNoneNone
OptionsA (semi-colon separated) list of options to be passed to the linker during linkSince CodeLite uses a makefile based system, you can pass complex expressions like $(shell wx-config --libs)$(LinkOptions)
Library PathA list of additional paths separated by semi-colons, to be passed to the linker for locating libraries/shared objectsIf a path contains white-space, surround it with double-quotes e.g. "/path/with a/space"$(LibPath)
LibrariesA list of libraries separated by semi-colons, to be passed to the linkerCodeLite removes any 'lib' prefix from the library name and it also removes the extension (.so, .dll, .a, .lib etc) e.g. Assuming using the default GNU g++ compiler, the following library name: libMyLibrary.1.a is converted into -lMyLibrary$(Libs)

Table 3: Linker Page

The Environment Page


This page contains information for codelite regarding which environment sets to apply for this workspace

FieldDescriptioncommentsMacro
Environment variable set to useSelect the environment variables to apply for this workspaceEnvironment variables are managed from the menu: Settings | Environment variables...None
Debugger 'PreDefined Types' set to useSelect the debgger pre-defined types to use for this workspaceDebugger pre-defined types are managed from the menu: Settings | Debugger Settings ... | PreDefined typesNone



The Debugger Page


This page contains project specific information about the debugger (which overrides the global settings of the debugger)

FieldDescriptioncommentsMacro
Debugger pathSelect the debugger executable to use for this projectIf left empty, codelite will use the debugger executable set from Settings | Debugger Settings...None
Host / ttySet the IP / Hostname hosting the gdbserverNoneNone
PortSet the port on which gdbserver is listening (not required when using 'tty')NoneNone



The Resource Page


Currently, CodeLite recognizes .rc files as resource file which will be passed to the resource compiler (if enabled; by default it's disabled)

This page contains information to be passed to the resource compiler during build:

  • Compiler options
  • Additional search path



FieldDescriptioncommentsMacro
Use with global settingsA three option choice box that instructs codelite how to merge between the 'Global Settings' and the settings set in this pageNoneNone
OptionsA (semi-colon separated) list of options to be passed to the resource compilerSince CodeLite uses a makefile based system, you can pass complex expressions like $(shell wx-config --rcflags)$(RcCmpOptions)
Additional Search PathA (semi-colon separated) list of paths (relative or absolute) to be passed to the resource compilerIf a path contains white-space, surround it with double-quotes e.g. "/path/with a/space"$(RcIncludePath)



The Pre Build Page


On this page, you can define a collection of shell commands to be executed before the compilation starts. This is useful for cases when a certain pre-processor stage should be applied to file(s) before the actual build process starts.

Each command can be enabled/disabled by placing a pound sign in front of it ('#')

An example command:

 wxrc /c /v /o resources.cpp resources.xrc



The Post Build Page


On this page, you can define a collection of shell commands to be executed after the link is ended (successfully).

Each command can be enabled/disabled by placing a pound sign in front of it ('#')

Example commands:

 cp *.a  ../../lib/
 cp *.h  ../../include/



The Custom Build Page


There are cases, usually a legacy project or an existing project which depends on an particular build system, where a user would like to use a pre-existing build system instead of a makefile auto-generated by CodeLite. The next tab, 'Custom Build', allows this; and is described here.

Custom Makefile Steps


This page allows user to specify makefile rule(s) to be executed during the pre-build stage (actually, it will be executed before the commands provided in the 'Pre Build' page).

You must be familiar with makefile writing conventions to use this page.

The main different between the commands executed in the Pre-Build stage and the commands that will be executed in this rule, is that the commands in the Pre-Build stage are executed unconditionally, while rules set here are executed based on their dependencies.

For example, lets assume that we have a project with a yacc & flex files that needs to be preprocessed by the Yacc & Flex tools before compilation to generate the appropriate .cpp/h files. Now, we could place the following five rules inside the 'Pre Build' page that performs the work:

 yacc -dl  -t -v grammar.y
 mv y.tab.c parser.cpp
 mv y.tab.h lexer.h
 flex -L  lexer.l
 mv lex.yy.c lexer.cpp

However, the problem with the above rules, is that they are executed every time we hit the build button, which results in constant rebuilds...

To workaround this 'constant rebuilds' we add an advance makefile rule, instead of the above commands:

In the dependencies line, we set the generated files as the dependencies, for our example, the generated files are parser.cpp and lexer.cpp, so the dependencies line contains:

 parser.cpp lexer.cpp

As the rule content we set the following:

 ## rule to generate parser.cpp based on grammar.y
 parser.cpp: grammar.y
     @echo Generating parser.cpp and lexer.h ...
     yacc -dl  -t -v grammar.y
     mv y.tab.h lexer.h
     mv y.tab.c parser.cpp

 ## rule to generate lexer.cpp based on lexer.l
 lexer.cpp: lexer.l
     @echo Generating lexer.cpp ...
     flex -L  lexer.l
     mv lex.yy.c lexer.cpp



The 'parser.cpp' rule is executed only if grammar.y was modified, and lexer.cpp rule is executed only if lexer.l was modified.


The Global Settings Page


This page contains 3 tabs which are identical to the 'Compiler', 'Linker' and 'Resources' pages The idea is to provide a location where user can provide settings which will affect *all* build configuration thus reduce the typing and duplicating settings between the different configuration (e.g. Release / Debug)

Edit - History - Print - Recent Changes - Search
Page last modified on June 24, 2011, at 06:53 AM