Page 1 of 1

Global preprocessor settings

Posted: Sun Feb 26, 2012 10:51 am
by koolgraph
Hi, I searched all over the IDE and never found something like a Workspace global pre-processors options or an IDE's global. I searched the web for a macro defined natively by Codelite to identify itself like MSVC or C::B but found nothing.

That would be really helpful so if someone can lead me to something or a workaround to do the same thing, that would be really appreciated

Re: Global preprocessor settings

Posted: Thu Mar 01, 2012 11:03 am
by eranif
A workaround can be achieved by making a new toolchain from: settings -> build settings -> Compilers -> New...

Create a clone of the g++ toolchain, and name it something 'g++ with macro'
Now, edit the newly created compiler and add the macros to the toolchain you want:

so instead of 'C++ compiler name': g++
it now becomes: g++ -DMYMACRO

Right click your project and select 'settings' and update the compiler In the "Common Settings => General" with the new one


From this point on, everytime you modify the toolchain it will affect all projects that are using it

You can also submit feature request at source forge
Eran

Re: Global preprocessor settings

Posted: Thu Mar 01, 2012 3:21 pm
by koolgraph
Thanks for the reply, i had done something like this and it seemed not to work. I must have done something wrong, i'll try again.

Thanks again.