Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: dfatcb on September 30, 2011, 02:32:59 am

Title: Setup other options per source module type?
Post by: dfatcb on September 30, 2011, 02:32:59 am
I do things like setup -fno-rtti as other options for the compiler.  However, when c modules are compiled there are warnings about no-rtti is valid for C++/ObjC++ but not for C.  The project has 3000 source members.  It be nice if I could set options based on type (C++ files (.cpp/.cxx/etc..) can get their own and .c files their own).  Can that be done now or added later?  TIA!!
Title: Re: Setup other options per source module type?
Post by: Alpha on September 30, 2011, 03:20:48 am
The only way I have found around this problem (perhaps there are other, better methods I do not know of) is to keep C files in targets (or projects if I am using a workspace) separate from the C++ files, and defining per-target (or per-project) build options instead of global ones.