Enforce compiler settings via macros

I am developing a framework which requires very strict compiler settings. Every time a new project is started and uses the framework, it must adhere to the settings (for example, warning level 4). Is there any way I can do that via macros and pragma statements? This will also allow me to do something like:

#ifndef NOT_USING_STRICT_SETTINGS // All settings checks go here OR settings over-rides go here #endif

This will benefit me as well in case I create a new project and forget to apply some settings.

-------------Problems Reply------------

You can get the list of predefined macros from MSDN: http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx

These macros also allow checking for compiler directives.


#define USING_STRICT_SETTINGS defined(_MT) && defined(_OPENMP)

Category:c# Views:0 Time:2011-06-08

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.465 (s). 11 q(s)