Can someone please point out where in the Visual Studio 2008 configurations I can set which .cpp files are used for a given build.
I'd like to use a different set(s) of .cpp files when I am doing a release vs.debug build.
Thanks!
Can someone please point out where in the Visual Studio 2008 configurations I can set which .cpp files are used for a given build.
I'd like to use a different set(s) of .cpp files when I am doing a release vs.debug build.
Thanks!
Your best bet to achieve that kind of behaviour would be to use #ifdef
blocks to discriminate between debug and release code.
At the extreme case you could #ifdef
a #include
line of code that selectively includes other files.
I don't know of any normal way to dynamically change the .cpp files compiled in a project based on build type.
I can open the property pages for any specific .cpp file in VS2008 (from the solution explorer). One of the properties in the general section is exclude from build yes/no. All these properties are configurable by build type.
I have used this to exclude some debug support files in release versions.
Select your configuration from Solution Configurations drop down and platform from Solution Platforms drop down on Standard toolbar. Right-click a cpp file and choose Properties. On the branch General set property Excluded From Build to Yes or No.