summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-11-11 19:09:59 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-11-12 10:13:13 +0000
commitc1e0e0adb2fb5c62f4d1677a85c677c57e2737f3 (patch)
tree603c64ffee2a71c193f3dd27323ec48015935117
parent4fe8330b5b71c546c891a6ec3e706e48842ea67a (diff)
pro2cmake: Fix incorrect replacement of x86 conditions
The regular expression used to eat the character that comes after the x86 token, which was incorrect when matching x86SimdAlways. Fix the regular expression to use a lookahead with a negative character class of word characters. Change-Id: I9ed8f9a490369bf5704b752f8bba3b7118a2cd5b Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-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 b40c35e355..b95b469e37 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -1299,7 +1299,7 @@ def map_condition(condition: str) -> str:
condition = condition.replace("|", " OR ")
# new conditions added by the android multi arch qmake build
- condition = re.sub(r"(^| )x86([^\_]|$)", "TEST_architecture_arch STREQUAL i386", condition)
+ condition = re.sub(r"(^| )x86((?=[^\w])|$)", "TEST_architecture_arch STREQUAL i386", condition)
condition = re.sub(r"(^| )x86_64", " TEST_architecture_arch STREQUAL x86_64", condition)
condition = re.sub(r"(^| )arm64-v8a", "TEST_architecture_arch STREQUAL arm64", condition)
condition = re.sub(r"(^| )armeabi-v7a", "TEST_architecture_arch STREQUAL arm", condition)