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 <albert.astals.cid@kdab.com>
This commit is contained in:
Tobias Hunger 2019-02-11 11:36:00 +01:00
parent 4a9d96cd91
commit b388bc7e77

View File

@ -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_')