当前位置: 动力学知识库 > 问答 > 编程问答 >

visual c++ - How do I set the compiler warning level for all projects in VS2013?

问题描述:

I am currently working on a software written in C++ that consists of 70+ projects in Visual Studio 2013. I now want to increase the compiler level for all those projects without clicking through 70+ project property windows to set the new value for the compiler warning level.

Is there any way to quickly set the compiler warning level for all projects in a Visual Studio workspace?

网友答案:

Select all projects, then click on properties. It will open properties page. Here select "All Configurations" and "All Platforms". Then set appropriate warning levels, which will apply to all projects/configurations/platforms.

You may de-select any config/platform, and apply the warning level for all projects. Consider hitting "Configuration Manager..." button on right.

If you are willing to edit the .VCXProj - do that! It will be fastest, but please backup all of them.

Another approach is to have a common header file, and place:

#pragma warning(error:<warning-number>)

This allows you to have more finer control to all warnings. But, you'd need to write almost all of them in header. But, you can configure for different builds.

分享给朋友:
您可能感兴趣的文章:
随机阅读: