summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionParser.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-3/+3
|
* Fix some Clang -Wstring-conversion warningsSean McBride2014-12-121-2/+2
| | | | | Some false positives, but some flagged faulty asserts where the ! was inside the string instead of outside.
* use size_t for GeneratorExpressionContent::ContentLength to fix some warningsRolf Eike Beer2013-10-211-1/+1
| | | | | | CMake/Source/cmGeneratorExpressionParser.cxx: In member function ‘void cmGeneratorExpressionParser::ParseGeneratorExpression(std::vector<cmGeneratorExpressionEvaluator*>&)’: CMake/Source/cmGeneratorExpressionParser.cxx:116:55: warning: conversion to ‘unsigned int’ from ‘long int’ may alter its value [-Wconversion] CMake/Source/cmGeneratorExpressionParser.cxx:240:39: warning: conversion to ‘int’ from ‘long int’ may alter its value [-Wconversion]
* Genex: Fix segfault when parsing ends with parameter expectation.Stephen Kelly2013-08-131-1/+19
| | | | | | | The extendResult method expects a non-empty parameters vector, as assured by the normal case. Avoid calling the method when the parser finds an incomplete generator expression, but has already entered the state of expecting to find parameters.
* Genex: Don't segfault on $<FOO,>Stephen Kelly2012-11-271-1/+9
| | | | | | Treat the comma as part of the identifier here. It will later not resolve to a generator expression and the user gets a proper error message.
* GenEx: Add some more asserts to verify code-sanity.Stephen Kelly2012-10-171-0/+12
|
* GenEx: Break if there are no more commas in the containerStephen Kelly2012-10-171-0/+4
| | | | | This was causing an assert on Windows which has safety features for iterating past the end of the container.
* GenEx: Fix termination bugs in generator expression parser.Stephen Kelly2012-10-171-13/+24
| | | | | | | Content which is incomplete as a generator expression could cause segfaults by advancing an iterator beyond end() and dereferencing it. Such incomplete generator expressions should be treated as plain text instead.
* GenEx: Parse colon after arguments separator colon specially.Stephen Kelly2012-10-171-2/+9
| | | | | | The rationale is similar to that in commit b3d8f5da (GenEx: Parse comma after colon tokens specially, 2012-10-04), in that colon tokens should not be parsed as identifier-argument delimiters after the first colon.
* GenEx: Parse comma after colon tokens speciallyStephen Kelly2012-10-091-1/+7
| | | | | | | | | | | | | | | Otherwise the comma is treated as plain text by ParseContent. $<STREQUAL:,> should be valid and true. $<STREQUAL:,something> should be valid and false. $<STREQUAL:,,> should be non-valid as it is 3 parameters. $<STREQUAL:something,,> should be non-valid as it is 3 parameters. Additionally, this allows reporting the correct error for other expressions. For example $<TARGET_PROPERTY:,> should be invalid because it has an empty target and empty property. It shouldn't attempt to read the property ',' on the 'implicit this' target.
* GenEx: It is not an error to specify an empty parameterStephen Kelly2012-10-091-4/+0
| | | | This is allowed by the CONFIG and STREQUAL expressions.
* Handle colons as a special case in the generator expression parser.Stephen Kelly2012-09-211-0/+5
| | | | | | | | | | Like the special case for commas, this ensures that the colon only has special meaning as the delimiter between the identifier and the parameters of a particular expression, but constructs such as INCLUDE_DIRECTORIES "$<1:C:\foo>" are legal.
* cmGeneratorExpression: Re-write for multi-stage evaluationStephen Kelly2012-09-181-0/+235
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.