In a standard C++ project the /O2 option is passed in during a standard release build.  However, unless you've mucked with the Optimization settings the setting is not set in the project file it is the default.  (I.e. the Optimization attribute does not exist for the VCCLCompilerTool.)  As a result Nant does not compile it's sources with the /O2 flag.
 
There is a work around.  If you set the Optimization to something different (save) and then change it back to /O2 in the project - VS.Net will force the Optimization="2" attribute to exist in the project.
 
Ray

Reply via email to