I've set up my application release process on Jenkins CI. The build command is:
"c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" foo.sln /Rebuild "Release" /Out log.txt
The optimization flags (/LTCG /OPT:REF /OPT:ICF
) are enabled in foo.sln.
When I development on my machine, I would like to disable those flags (so incremental build is available) in order to reduce the build time. My problem is I have to check out foo.sln from version control system (Perforce in my case), disable the flags. However, whenever I need to check in any changes to foo.sln, I have to toggle optimization flags before check-in and after submitted. So my local settings won't get checked in. Is there a way to make this process easier (avoid toggling the local settings)?
I found some similar questions on SO, but those are for Web.config/App.config. Not for foo.sln solution files.
Using different Web.config in development and production environment
How to select different app.config for several build configurations