Commit Graph

8 Commits

Author SHA1 Message Date
Stephen Kelly f1eacf0e07 cmGeneratorExpression: Re-write for multi-stage evaluation
The expressions may be parsed and then cached and evaluated multiple
times.  They are evaluated lazily so that literals such as ',' can be
treated as universal parameter separators, and can be processed from
results without appearing literally, and without interfering with the
parsing/evaluation of the entire expression.
2012-09-18 17:02:23 -04:00
Brad King 9d9f616792 Add $<CONFIG:...> boolean query generator expression
This expression evaluates to '1' or '0' to indicate whether the build
configuration for which the expression is evaluated matches tha named
configuration.  In combination with the "$<0:...>" and "$<1:...>"
expressions this allows per-configuration content to be generated.
2012-08-15 11:44:49 -04:00
Brad King ebf05abda1 Add boolean generator expressions
Add generator expressions that combine and use boolean test results:

 $<0:...>         = empty string (ignores "...")
 $<1:...>         = content of "..."
 $<AND:?[,?]...>  = '1' if all '?' are '1', else '0'
 $<OR:?[,?]...>   = '0' if all '?' are '0', else '1'
 $<NOT:?>         = '0' if '?' is '1', else '1'

These will be useful to evaluate (future) boolean query expressions and
condition content on the results.  Include tests and documentation.
2012-08-15 11:44:49 -04:00
Brad King 08428ba38a Allow '.' in target names in generator expressions (#12002)
Simply add this character to the allowed list in the regular expression
used to parse generator expression components.
2011-03-22 16:26:20 -04:00
Brad King 4749e4cb76 Record set of targets used in cmGeneratorExpression 2010-12-15 14:53:46 -05:00
Brad King ef9e9de0b8 Optionally suppress errors in cmGeneratorExpression 2010-12-15 14:53:39 -05:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King d2e1f2b4d6 Introduce "generator expressions" to add_test()
This introduces a new syntax called "generator expressions" to the test
COMMAND option of the add_test(NAME) command mode.  These expressions
have a syntax like $<TARGET_FILE:mytarget> and are evaluated during
build system generation.  This syntax allows per-configuration target
output files to be referenced in test commands and arguments.
2009-08-11 09:54:56 -04:00