Using non default targets.

General questions regarding the usage of CodeLite
redlazystickman
CodeLite Curious
Posts: 1
Joined: Fri May 07, 2021 6:47 pm
Genuine User: Yes
IDE Question: C++
Contact:

Using non default targets.

Post by redlazystickman »

So I have a make file which looks something like this:

Code: Select all

build:
	g++ ./src/*.cpp -lSDL2 -lSDL2_image -g -Wall -Werror -o ./Debug/main

ASan:
	g++ ./src/*.cpp -lSDL2 -lSDL2_image -fsanitize=address -g -o ./Debug/main

// More sanitizer targets
//
// I do this because apparently some sanitizers arent compatible with each other.
// And sometimes I want to switch between gcc and clang in hopes of better error messages

I can build target ASan using the drop down in the Build button. But trying to execute the code through run button, codelite rebuilds the project with standard build target removing sanitizers. I tried to use debug button with breakpoints disabled but that kills the window as soon as the program ends (I guess I have messed up a setting here). How do I achieve what I want. Running a custom target.

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using non default targets.

Post by eranif »

if you are using custom Makefiles, I suggest that you go for the file system workspace and define each target there

Make sure you have read the HOW TO POST thread
Post Reply