Property Types (C+)

The project system differentiates properties into two types: simple properties and aggregate properties. Each type of property is evaluated differently for property inheritance.

Simple Properties

Simple properties are all non-string properties, such as integer, boolean, and enum properties, and only hold a single value. If they are defined at the local level (this file configuration, this configuration, or this property sheet), then the inherited value is ignored. An example of such a property is the WarnAsError, which sets the /WX switch for CL.EXE.

Aggregate Properties

Aggregate properties are always string properties. The value of an aggregate property, defined at any level, is concatenated with the value of its parent. An example of an aggregate property is the AdditionalIncludeDirectories which sets the /I switch for CL.EXE. Path properties are good examples of aggregate properties because they comprise a list of several values, rather than being a single value.

There are three special built-in macros that control property evaluation for aggregate properties:

  • $(Inherit)
    Specifies to evaluate the property values of the parent, and insert those values in place of the macro. When $(Inherit) is not specified anywhere, it is implied at the end of the value, which means the values of the parent will be appended to the value at the current level.

  • $(NoInherit)
    Specifies to not append the property values of the parent to the aggregate property. The $(NoInherit) macro overrides the $(Inherit) macro.

  • $(StopEvaluating)
    Specifies to stop all evaluation on the particular aggregate property where the macro is encountered. Any values after the $(StopEvaluating) macro are lost.

See Also

Concepts

Evaluation of Inherited Properties

Property Inheritance