Page 1 of 1

Using non default targets.

Posted: Fri May 07, 2021 9:44 pm
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.


Re: Using non default targets.

Posted: Mon May 10, 2021 11:09 pm
by eranif

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