User forums > General (but related to Code::Blocks)
default flags for debug/release target
exchg:
Hi to all,
Is it possible to redefine default compiler flags for debug and release build target ?
I want that every new project release target by default have -O3 flag for example.
oBFusCATed:
Yes, change the template script you're using to create your projects.
BlueHazzard:
--- Quote from: oBFusCATed on April 03, 2017, 10:47:37 pm ---Yes, change the template script you're using to create your projects.
--- End quote ---
This can be done by right click on the project type in the "new project wizard" and then hit "edit this script"
exchg:
ah, got it!
is there any script documentation ?
update:
i just try to use target.AddCompilerOption(_T("-O3")); and it works but it's toggle both flags -o2 and -o3 and also send both to compiler.
is it some bug or i just need also to add something like target.RemoveCompilerOption(_T("-O2")); ?
oBFusCATed:
Have you inspected if the script adds the -O2 explicitly?
Navigation
[0] Message Index
[#] Next page
Go to full version