Extend handling of special condtions
Extend the hanlding of special condtions outside single line statements. Conditions such as 'qtHaveModule(gui):qtConfig(opengl(es1|es2)?)' would not be handled properly. Change-Id: I992f75311b82d84c574c9cb4ef6d7d648f425d81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
5d7bb2e4f0
commit
5424c72ab6
@ -978,10 +978,10 @@ def parseProFile(file: str, *, debug=False):
|
|||||||
|
|
||||||
def map_condition(condition: str) -> str:
|
def map_condition(condition: str) -> str:
|
||||||
# Some hardcoded cases that are too bothersome to generalize.
|
# Some hardcoded cases that are too bothersome to generalize.
|
||||||
condition = re.sub(r'^qtConfig\(opengl\(es1\|es2\)\?\)$',
|
condition = re.sub(r'qtConfig\(opengl\(es1\|es2\)\?\)',
|
||||||
r'QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3',
|
r'QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3',
|
||||||
condition)
|
condition)
|
||||||
condition = re.sub(r'^qtConfig\(opengl\.\*\)$', r'QT_FEATURE_opengl', condition)
|
condition = re.sub(r'qtConfig\(opengl\.\*\)', r'QT_FEATURE_opengl', condition)
|
||||||
condition = re.sub(r'^win\*$', r'win', condition)
|
condition = re.sub(r'^win\*$', r'win', condition)
|
||||||
|
|
||||||
def gcc_version_handler(match_obj: re.Match):
|
def gcc_version_handler(match_obj: re.Match):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user