Features: Add COMPILE_FEATURES generator expression.

Allow setting build properties based on the features available
for a target.  The availability of features is determined at
generate-time by evaluating the link implementation.

Ensure that the <LANG>_STANDARD determined while evaluating
COMPILE_FEATURES in the link implementation is not lower than that
provided by the INTERFACE of the link implementation.  This is
similar to handling of transitive properties such as
POSITION_INDEPENDENT_CODE.
This commit is contained in:
Stephen Kelly
2014-05-15 11:32:30 +02:00
parent aa8a6fcee8
commit 0dfe395e3c
26 changed files with 311 additions and 0 deletions
@@ -22,3 +22,7 @@ target-language-features
* New :command:`target_compile_features` command allows populating the
:prop_tgt:`COMPILE_FEATURES` target property, just like any other
build variable.
* New ``COMPILE_FEATURES``
:manual:`generator expression <cmake-generator-expressions(7)>` allows
setting build properties based on available compiler features.