CMake offers three types of generator expression:
- Logical expressions, with the basic pattern $<condition:outcome>. The basic conditions are 0 for false and 1 for true, but any Boolean can be used as a condition, provided that the correct keywords are used.
- Informational expression, with the basic pattern $<information> or $<information:input>. These expressions evaluate to some build system information, for example, include directories, target properties, and so forth. The input parameter to these expressions might be the name of a target, as in the expression $<TARGET_PROPERTY:tgt,prop>, where the information obtained will be the prop property on the tgt target.
- Output expressions, with the basic pattern $<operation> or ...