From b388bc7e770439d3842034010f41ff2f20326d40 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 11 Feb 2019 11:36:00 +0100 Subject: [PATCH] CMake: pro2cmake.py: Handle equals(foo, bar) in conditions This adds an overly simplistic mapping -- just like it does for the rest of the qmake test functions. Change-Id: I0c9e3b70c1c3d0c68a245706a141aa7b7cb4d8bf Reviewed-by: Albert Astals Cid --- util/cmake/pro2cmake.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 9cd1b7a5424..04e76635c06 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -616,6 +616,8 @@ def map_condition(condition: str) -> str: condition = re.sub(r'\bisEmpty\s*\((.*?)\)', r'\1_ISEMPTY', condition) condition = re.sub(r'\bcontains\s*\((.*?), (.*)?\)', r'\1___contains___\2', condition) + condition = re.sub(r'\bequals\s*\((.*?), (.*)?\)', + r'\1___equals___\2', condition) condition = re.sub(r'\s*==\s*', '___STREQUAL___', condition) condition = condition.replace('*', '_x_')