I would like to pass certain options to the compiler such as -Wall
. The IDE I am working in makes it difficult to change the flags repeatedly, hence I would like to pass the compiler option from within the source file itself.
Is this possible via a preprocessor directive or a hack of some sort (restricted to the source code to be compiled)?
For example, say I want to compile a program with the -Wall
and I do not have access to the arguments being passed to gcc from the IDE. I would like to do something like #<directive> WALL
that the preprocessor looks for and enables for the compilation process.