如何在解决方案级别添加附加的include目录? [英] How to add additional include directory on solution level?

查看:193
本文介绍了如何在解决方案级别添加附加的include目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大约30个项目的解决方案(这不是我的错)。我有几个版本的boost。每个解决方案都使用它自己的boost版本。现在为每个项目提供升级(30次)。
如何设置提升解决方案级别?我想说这个解决方案使用boost_1.39,这个解决方案使用boost_1.33。
我可以在工具/选项/项目和解决方案/ VC ++目录中的VisualStudio级别全局添加路径。这样做是坏的,因为那时我所有的solutios都使用一个提升。或者我可以设置提升项目级别。但是如何解决这个问题?

解决方案

使用Property Manager将您的公用设置放入可重用的属性表文件中,按照惯例,它具有.props文件扩展名。您可以将工作表(或工作表)应用于现有和新项目,以便您不必手动设置每个项目的公共属性。任何由包含的表格定义的属性将适用,除非它被项目的.vcxproj文件/设置覆​​盖。



您可以通过三个步骤创建一个新的可共享属性表文件: / p>


  1. 选择查看,物业管理。物业经理打开。默认情况下,它位于左侧视图。

  2. 右键单击应用该属性的项目/范围,然后选择添加新项目属性表。指定名称和位置。

  3. 打开新的属性表,然后设置要包含的属性。

这是从2003年至2015年的所有版本的Visual Studio的文档,主题为使用项目属性


I have a big solution with ~30 projects(it's not my fault). I have several versions of boost. Each solution uses it's own version of boost. For now boost is set for each project(30 times). How to set boost on solution level? I want to say this solution uses boost_1.39, this solution uses boost_1.33. I can add path globally on VisualStudio level in Tools/Options/Project and Solutions/VC++ Directories. This way is bad, because then all my solutios use one boost. Or i can set boost on Project level. But how to do it for solution? Such feature is present on any build system.

解决方案

Use the Property Manager to put your common settings into a reusable property sheet file, which by convention has a .props file name extension. You can apply the sheet (or sheets) to your existing and new projects so that you don't have to manually set the common properties on each one. Any property defined by the included sheet will apply unless it's overwritten by the project's .vcxproj file / settings.

You can create a new shareable property sheet file in three steps:

  1. Choose View, Property Manager. The Property Manager opens. By default it is in the left view.
  2. Right-click the item/scope to which the property applies then choose Add New Project Property Sheet. Specify a name and location.
  3. Open the new property sheet and then set the properties you want to include.

This is documented for all versions of Visual Studio from 2003 - 2015 under the subject Working with Project Properties

这篇关于如何在解决方案级别添加附加的include目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆