CMake: Handle '-' better in pro2cmake

Do not fail on tests/benchmarks/benchmark.pro.

Change-Id: I0ffdf9d38ea6fa73856f33d44c5a428c9cab9107
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tobias Hunger 2018-11-01 14:57:31 +01:00
parent f3cf1a6856
commit 96ddd79b03

View File

@ -300,7 +300,7 @@ class QmakeParser:
LC = pp.Suppress(pp.Literal('\\') + pp.LineEnd())
EOL = pp.Suppress(pp.Optional(pp.pythonStyleComment()) + pp.LineEnd())
Identifier = pp.Word(pp.alphas + '_', bodyChars=pp.alphanums+'_./')
Identifier = pp.Word(pp.alphas + '_', bodyChars=pp.alphanums+'_-./')
Substitution = pp.Combine(pp.Literal('$')
+ (((pp.Literal('$') + Identifier + pp.Optional(pp.nestedExpr()))
| (pp.Literal('(') + Identifier + pp.Literal(')'))