CMake: pro2cmake.py: Make \$\$QT_FOO work in assignments

This broke somewhere along the way. Add a test for this.

Change-Id: I106ddff6eb86a51ef132285d1bc623f3b5cf71fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tobias Hunger 2019-02-27 15:17:36 +01:00
parent 754ba28799
commit 33fe56c630
3 changed files with 10 additions and 1 deletions

View File

@ -544,7 +544,7 @@ class QmakeParser:
SubstitutionValue \
= pp.Combine(pp.OneOrMore(Substitution | LiteralValuePart
| pp.Literal('$')))
Value = pp.NotAny(Else | pp.Literal('}') | EOL | pp.Literal('\\')) \
Value = pp.NotAny(Else | pp.Literal('}') | EOL) \
+ (pp.QuotedString(quoteChar='"', escChar='\\')
| SubstitutionValue
| BracedValue)

View File

@ -0,0 +1,2 @@
MODULE_AUX_INCLUDES = \
\$\$QT_MODULE_INCLUDE_BASE/QtANGLE

View File

@ -287,3 +287,10 @@ def test_realworld_sql():
assert len(result) == 2
validate_op('TEMPLATE', '=', ['subdirs'], result[0])
validate_op('SUBDIRS', '=', ['kernel'], result[1])
def test_realworld_qtconfig():
result = parse_file(_tests_path + '/data/escaped_value.pro')
assert len(result) == 1
validate_op('MODULE_AUX_INCLUDES', '=', ['\\$\\$QT_MODULE_INCLUDE_BASE/QtANGLE'], result[0])