User forums > Using Code::Blocks
Setting different Build Options for an individual file
(1/1)
ChuckH:
I'm a Code::Blocks newbie doing AVR embedded development using the WinAVR (gcc) toolchain.
Question: I know how to set Build Options for the build target but I haven't been able to figure out how to set Build Options for an individual file.
For example: With -O (optimize) selected for the target in general how do I turn this option off for a specific file?
In my case I need to compile most of the files with -O on so that the code will fit in the processor but I need to compile one file with no -O option to make debugging (W/AVRStudio 4) easier.
Thanks, Chuck Hackett
oBFusCATed:
Right click on the file -> properties -> advanced...
ChuckH:
--- Quote from: oBFusCATed on March 17, 2011, 03:22:40 pm ---Right click on the file -> properties -> advanced...
--- End quote ---
Thanks, I was looking for the same kind of "append these options" action that is provided for targets but this works fine.
Took me a minute to realize that I needed to enter the entire 'default' compiler directive "$compiler $options $includes -c $file -o object" as noted below the "custom build" text box.
Thanks for the help :D
Chuck Hackett
Navigation
[0] Message Index
Go to full version