Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Martin K. on October 30, 2012, 11:37:21 am

Title: remove/change compiler option for a single file.
Post by: Martin K. on October 30, 2012, 11:37:21 am
Hello Code:Blocks Gurus,

I want to change a compiler option for a single file. As far as i know, i have to use a custom build command for this. but how?
The problem is a project (Visual Studio Compiler) with precompiled headers enabled. This is Option "/Yu"stdafx.h". But on file doesn't have stdafx.h included, so i have to remove this option. Setting additional options in a custom build command is easy, but removing one? Any Ideas?

Thanks
Martin
Title: Re: remove/change compiler option for a single file.
Post by: MortenMacFly on October 30, 2012, 01:15:48 pm
Setting additional options in a custom build command is easy, but removing one? Any Ideas?
In the file properties you can do this - right click on a file in a project and select properties, then look into the options.

But careful: You can screw the build process if you do it wrong.
Title: Re: remove/change compiler option for a single file.
Post by: Martin K. on October 30, 2012, 01:27:50 pm
Setting additional options in a custom build command is easy, but removing one? Any Ideas?
In the file properties you can do this - right click on a file in a project and select properties, then look into the options.

But careful: You can screw the build process if you do it wrong.

Hi,

Ich have found this option already, but i don't know what to do than.
Something like "$compiler [[ removeoption($options) ]]  $includes -c $file -o $object" i think, but how?

Sorry, i'm not a "squirrel" man currently.
Martin