summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-22 17:54:34 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-23 05:28:18 +0000
commit303095e686bc647b0d6766fa70b18a8bd41f1caf (patch)
treeea4468ee842971be79686f4b0e7d47895c5f0547
parent5f856a6d0c347bb8ed18be80e7ae3ebd5c9fe850 (diff)
pro2cmake: Fix regexp for parsing env var expansion
The qmake syntax for env var expansion is "$$()". The parantheses are not optional, so the optional "?" modifiers should be removed. This fixes the failing test_recursive_expansion pytest. Amends c58df80cf7926b07da9fe6515230bd4295c1fc6d. Change-Id: I5d7217555287ee7d96d6b38027964b1141af208a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
-rwxr-xr-xutil/cmake/pro2cmake.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 4411dc8c2c..aad0d621f6 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -1098,7 +1098,7 @@ class Scope(object):
if not isinstance(value, str):
return value
- pattern = re.compile(r"\$\$\(?([A-Za-z_][A-Za-z0-9_]*)\)?")
+ pattern = re.compile(r"\$\$\(([A-Za-z_][A-Za-z0-9_]*)\)")
match = re.search(pattern, value)
if match:
value = re.sub(pattern, r"$ENV{\1}", value)