mirror of
1
0
Fork 0

Merge branch 'patch-1' into 'master'

fix broken `generator expressions` link

See merge request CLIUtils/modern-cmake!30
This commit is contained in:
Henry Schreiner 2020-03-30 16:30:50 +00:00
commit f7b4f9ac29
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ There are a variety of keywords as well, such as:
* Parentheses can be used to group
## «cmake:Generator-expressions»
## «cmake:generator-expressions»
«cmake:Generator-expressions» are really powerful, but a bit odd and specialized. Most CMake commands happen at configure time, include the if statements seen above. But what if you need logic to occur at build time or even install time? Generator expressions were added for this purpose.[^1] They are evaluated in target properties.
«cmake:generator-expressions» are really powerful, but a bit odd and specialized. Most CMake commands happen at configure time, include the if statements seen above. But what if you need logic to occur at build time or even install time? Generator expressions were added for this purpose.[^1] They are evaluated in target properties.
The simplest generator expressions are informational expressions, and are of the form `$<KEYWORD>`; they evaluate to a piece of information relevant for the current configuration. The other form is `$<KEYWORD:value>`, where `KEYWORD` is a keyword that controls the evaluation, and value is the item to evaluate (an informational expression keyword is allowed here, too). If KEYWORD is a generator expression or variable that evaluates to 0 or 1, `value` is substituted
if 1 and not if 0. You can nest generator expressions, and you can use variables to make reading nested variables bearable. Some